Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Database activity module.

Database activity module: Difference between revisions

From MoodleDocs
(Moved the "don't be confused")
mNo edit summary
 
(39 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{Databases}}
[[ru: База_данных]]
{{Moodle 1.6}}
{{Database activity module}}
The database activity module allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things.  


The '''Database module''' allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things. You may be familiar with similar technology from building Microsoft Access or Filemaker databases.
This module will create one table per instance, but you may create as many instances you need. The records can be linked to other tables and all resources in the course, if you allow autolink in a name field, but you cannot build a SQL query.  


:'''''Note:''' Please don't confuse this [[Adding resources and activities | activity type]] with Moodle's underlying SQL database, which stores all of the information used in Moodle courses and is only of interest to Moodle [[Administrators]].''
The table is not created in the SQL database, it is just stored there in lines of other SQL tables (mdl_data*).  




== How to use the database module ==
== How to use the database activity module ==
* The first task is to [[Adding/editing_a_database|add the database]]. You will be asked to give it a name, provide some text explaining its intended purpose to users and set a few other options.
* The first task is to [[Adding/editing_a_database|add the database]]. You will be asked to give it a name, provide some text explaining its intended purpose to users and set a few other options.
* Next you define the kind of [[Fields]] that define the information you wish to collect. For example a database of famous paintings may have a [[picture field]] called ''painting'', for uploading an image file showing the painting, and two [[text fields]] called ''artist'' and ''title'' for the name of the artist and the painting.
* Next you define the kind of [[Database fields|fields]] that define the information you wish to collect. For example a database of famous paintings may have a picture field called ''painting'', for uploading an image file showing the painting, and two text fields called ''artist'' and ''title'' for the name of the artist and the painting.
* It is then optional to edit the [[Templates|database templates]] to alter the way in which the database displays entries.
* It is then optional to edit the [[Database templates|database templates]] to alter the way in which the database displays entries.
* Note that if you later edit the fields in the databases you must use the [[Reset template button]], or manually edit the template, to ensure the new fields are added to the display
* Note that if you later edit the fields in the databases you must use the Reset template button, or manually edit the template, to ensure the new fields are added to the display
* Finally the [[Teacher]] and/or [[Students]] can start entering data and (optionally) commenting on and grading other submissions. These entries can be [[viewed alone]], [[viewed as a list]] or [[searched and sorted]].
* the [[Teacher]] and/or [[Students]] can start entering data and (optionally) commenting on and grading other submissions. These entries can be viewed alone, viewed as a list or searched and sorted.
* Data can be uploaded into the database from a .csv file:
** Click the 'Add Entry' tab
** At the bottom of the page there is a link 'Upload entries from a file' which provides help in assigning data in a csv file to the relevant fields in your database.
 
==Database and Roles==
 
Since Moodle 1.7 a number of options in Database have been migrated over to the Roles system. For example, preventing students (or any other role) submitting data must be done by overriding the role for that particular instance of the Database. However, do note that by default teachers are unable to override roles and this ability must first be granted by your Administrator for the course or site as appropriate.


== Example databases ==
== Example databases ==
Line 29: Line 37:
* display student created photos/posters/websites/poems for peer comment and review
* display student created photos/posters/websites/poems for peer comment and review
* gather comments and votes on a shortlist of potential logos/mascot names/project ideas
* gather comments and votes on a shortlist of potential logos/mascot names/project ideas
* ...
* provide a [http://moodle.org/mod/forum/discuss.php?d=52699 student file storage area]
* maintain a log of what was done in a face-to-face class each day, so that absent students can get caught up themselves. [http://moodle.org/mod/forum/discuss.php?d=115047 Example]


== See also ==
== See also ==


* [[Glossary module]], which performs a similar though more specialised, text-based role and is also available for previous versions of Moodle.
* [[Glossary module]], which performs a similar though more specialised, text-based role
* [http://treadwell.cce.cornell.edu/moodle_doc/database_moodle/index.html a screencast introducing the Database Module and walking through creating a database]
* [[Using Moodle book]] Chapter 12: Databases
[[Category:Teacher]]
* [http://moodle.org/mod/data/view.php?id=7303 Database for Databases]
[[category:Modules]]
* Using Moodle [http://moodle.org/mod/forum/view.php?id=3505 Database activity module forum]
* [http://treadwell.cce.cornell.edu/moodle_doc/database_moodle/index.html Screencast introducing the Database Module and walking through creating a database]
* [http://moodle.org/mod/data/view.php?rid=2424 Tracking Students' Reading with the Moodle Database Module] presentation
Using Moodle forum discussions:
* [http://moodle.org/mod/forum/discuss.php?d=72260 Database Module: Each learner Private DB?]
* [http://moodle.org/mod/forum/discuss.php?d=84487 Database for Dummies please!]
* [http://moodle.org/mod/forum/discuss.php?d=89117 Restricting access to database content by user?]
* [http://moodle.org/mod/forum/discuss.php?d=139137 How to use the database activity module?]
 
[[Category:Modules]]
 
[[de:Datenbank]]
[[es:Base_de_datos_%28m%C3%B3dulo%29]]
[[eu:Datu-basea]]
[[fr:Base de données]]
[[cs:Modul Databáze]]
[[ja:データベースモジュール]]

Latest revision as of 04:35, 17 April 2010


The database activity module allows the teacher and/or students to build, display and search a bank of record entries about any conceivable topic. The format and structure of these entries can be almost unlimited, including images, files, URLs, numbers and text amongst other things.

This module will create one table per instance, but you may create as many instances you need. The records can be linked to other tables and all resources in the course, if you allow autolink in a name field, but you cannot build a SQL query.

The table is not created in the SQL database, it is just stored there in lines of other SQL tables (mdl_data*).


How to use the database activity module

  • The first task is to add the database. You will be asked to give it a name, provide some text explaining its intended purpose to users and set a few other options.
  • Next you define the kind of fields that define the information you wish to collect. For example a database of famous paintings may have a picture field called painting, for uploading an image file showing the painting, and two text fields called artist and title for the name of the artist and the painting.
  • It is then optional to edit the database templates to alter the way in which the database displays entries.
  • Note that if you later edit the fields in the databases you must use the Reset template button, or manually edit the template, to ensure the new fields are added to the display
  • the Teacher and/or Students can start entering data and (optionally) commenting on and grading other submissions. These entries can be viewed alone, viewed as a list or searched and sorted.
  • Data can be uploaded into the database from a .csv file:
    • Click the 'Add Entry' tab
    • At the bottom of the page there is a link 'Upload entries from a file' which provides help in assigning data in a csv file to the relevant fields in your database.

Database and Roles

Since Moodle 1.7 a number of options in Database have been migrated over to the Roles system. For example, preventing students (or any other role) submitting data must be done by overriding the role for that particular instance of the Database. However, do note that by default teachers are unable to override roles and this ability must first be granted by your Administrator for the course or site as appropriate.

Example databases

Moodle.org has three good examples of the database module in action:

  • Moodle Buzz, a database of the titles, authors and web links to news articles mentioning Moodle
  • Themes, a database with screenshots, download links and user comments about Moodle themes
  • Modules and plugins, a database containing a variety of web links (download, documentation, discussion) and info (maintainer, module type, requirements) about the modular components of Moodle, including those created by third parties.

Creative uses

You could use the database module to:

  • allow collaboration on building a collection of web links/books/journal references related to a particular subject
  • display student created photos/posters/websites/poems for peer comment and review
  • gather comments and votes on a shortlist of potential logos/mascot names/project ideas
  • provide a student file storage area
  • maintain a log of what was done in a face-to-face class each day, so that absent students can get caught up themselves. Example

See also

Using Moodle forum discussions: