The Database activity allows students and/or instructors to populate, display, search, and comment on a bank of record entries. The format and structure of these entries is highly customizable, with the option to include images, files, URLs, numbers, check boxes, and text. The Database activity well suited for many different kinds of assignments, such as collecting and sharing information, giving students a data array to work with, and presenting content for students.
Add a Database Activity
1. On your Moodle course, click Turn editing on.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540923915/original/m2tTYQWIV7UDjnOPXpjjuZj0uIyeXpiHxA.png?1717706000)
2. Click +Add an activity or resource in the section where you want to add the Database activity.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540923971/original/YMBB8dJDYXe0WPD5fGr5UEq8yahvPGhESg.png?1717706015)
3. In the Add an activity or resource window, select Database. The Adding a new Database page will open.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540924053/original/TDeQsgIVt2eI4IJfC1Lgwei2kbPY3oVuKA.png?1717706043)
4. On the Adding a new Database page, enter a name in the Name field and provide instructions or background information for your students in the Description field (optional).
![General Setting](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043215116598/original/F3a8819yRrX5qpYzqCm2B_v_8nFYL2fifQ.png?1619553765)
5. Adjust the Database settings in the Entries section.
- Approval required: If set to Yes, the entry will only be visible to everyone once the instructor has checked and approved it.
- Allow editing of approved entries: This option will be available if Approval required is set to Yes, which allows students who added their entries to edit or delete the approved entries.
- Allow comments on entries: Determine if you want to allow students to comment on each other's entries entries.
- Entries required before viewing: Determine the number of entries a student must add before they are allowed to see entries by other students.
- Maximum number of entries: Select the maximum number of entries a student can submit.
![Entries setting](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043217677282/original/RtmGcBw7ttJacmKQYm2mE2UG0ePx1erHSA.png?1620250229)
6. Adjust the database Availability settings.
- Available from/to: The dates the database is visible to students and new entries can be added.
- Read only from/to: The dates the database is available for viewing, but not open for data entry.
![Availability setting](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043217674367/original/ghtxxN8xfgmvmxtzx1lBFNvU-GdVkM-nfw.png?1620249427)
7. In Ratings section, determine how you will grade entries.
Database entries can be rated using a scale. Any ratings given are recorded in the gradebook.
- Roles with permission to rate: Identify users who have permission to rate items. This feature is not enabled until the activity is created. (Note: Once the Database activity is created, the list of roles may be changed via the permission link.)
- Aggregate type: Choose aggregate type from the drop-down list. The options are No ratings, Average of ratings, Count of ratings, Maximum rating, Minimum rating, and Sum of ratings.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540924614/original/3Mol29MoQBJq2m97ifZevnxmoegzamlFqA.png?1717706201)
8. Click Save and return to course button at the bottom of the page to return to your course main page.
![Save and return to course button](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043217392202/original/E5NgiMLqvLF2ZETPXTTNfYUUeK5TrpeAQg.png?1620205590)
Set up Entry Fields
1. On your Moodle page, click on the name of the Database activity.
2. Click the Fields tab in the Contextual menu.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540924802/original/qNRAR7wXeqKC7GriVIuqj0wK16DpiSMCsQ.png?1717706273)
3. From the Create a new field drop-down menu, select a field type. The types of fields possible are: Checkbox, Date, File, Latlong (latitude/longitude), Menu, Multimenu, Number, Picture, Radio button, Text area, Text input, and URL.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540924991/original/SULQefMFcf-rPYFe2faOcaTANEwqFo2N1Q.png?1717706327)
4. Configure the data fields according to the options provided and then click Add.
5. Use the Default sort field drop-down menu to choose the order in which fields will display in the database, and then click Save.
![Default sort field option](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043218093381/original/cD4SH0eFZYvrPmuwLUKDlxmgtMJ7xa-0pw.png?1620333653)
Define Database Templates
Templates for the Database activity allow you to control the visual layout of information when students are viewing, browsing, or editing database entries. To reduce setup complexity, we recommend creating all database fields before defining templates.
1. To set up your database template, click the Templates tab at the top of the page.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540925637/original/ECQuHtTbLdrWABy4r97MGG2WIjn2ofUemg.png?1717706554)
2. Click Save button at the bottom of the page.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540925764/original/i8jYNsv8NifWHF6yOelM-Yu3gv6gYOLerQ.png?1717706605)
Update Database Templates
If you want to make changes to the template that you created, you will need to reset the templates before the field displays to students. To update your database templates,
1. Open the Database page, and add and define new fields to use under the Fields tab.
2. Click Templates tab, then click the Add entry template tab.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540926799/original/jn-8mVYhuY8YNELfv38mNUUA6THBfnhmuA.png?1717706994)
3. Select Actions to Export preset, Publish preset on this site, or Reset all templates (located on the right).
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540927190/original/ZDgFXVWCQuK1fzJdhXhO3SgR7_vROByjyA.png?1717707116)
4. Click Save template button at the bottom of the page.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043540927609/original/cYIqoTY2dwgKqdlmamfdsK0rLutTyVbOyA.png?1717707267)
Note: You can repeat the steps above in the List template, Single template, and Advanced search template tabs. This will update the fields students see when browsing database entries, viewing one entry at a time, and searching within the database.
For details and instructions for your students on how to add entries to the database, see Add an Entry to a Database.