Database
Overview: Database in Moodle
Moodle provides a database system which allows storing information. Although the database currently has issues exporting data for different modules, it is sometimes convenient to store and share data with all the participants. Database consists of multiple fields, which you need to create. You also set each database to decide how many entries each participant must write in order to view other entries, minimum and maximum entries one is allowed, and so on.
How to Create a Database:
*Again, if you are new with the moodle database, please take note that this database may NOT be compatible with future databases. It is best to consult with Academic Technologist before using this system. Also, moodle database should not be used to store large amounts of data, as a stats or econ course may require, because overloading the database can cause moodle to crash.
- Go to “Add an activity…” and click Database.

- Enter name, introduction, and other information. Click “Save and display.”
You’ve made your first database!

- A new database does not have any fields, which is where all the data will actually be
entered. You need to implement them by selecting “Create a new field”

- Click one of the data types, and type Field name and description in the appropriate places. Hit “Add” to finish adding a new field. Note: only appropriate information entries will appear in each field. For example, if you create a field with Number and enter “five” instead of 5, it will appear 0 because it is not a number (Yes, it is a number in our language but computers think it’s a “Text”).

- Once you create all the data fields, you can start entering data by clicking “Add entry.” After entering information, click “Save and view” or “Save and add another” if you want to add another entry.

- Templates are a re-usable format that specify the code that goes into each field. Moodle Database uses it to format the appearance of entries. If you think you are not familiar with it, just hit “Save template” and proceed to the next. To edit templates, use “Available tags” next to the text box to change its format.

- To display the entries, select the database you want to see from the list under the Databases activity list. You should see all the entries, and you can also set how many entries appear per page by changing the number.

- If you want to export Moodle Database data, click on the export tab. Choose what format (CSV text, Excel, ODS) you want to export to, and which field(s) in the database you wish to export.








