Database - build a database activity (step 2)

1. Plan  |   2. Build   |  3. Test   | 4. Administer   |  5. Review   ||  Support  

database iconThis entry relates to the Database activity.

Once you have created the database activity 'shell', you need to build it (using fields) and create templates. To build the database you can:

Choose a predefined set of fields (preset)

    Once you have created the database, you need to define the field types for the information you wish to collect. You can use a database preset (or predefined set up fields). Optionally, you can then edit the database templates to alter the way in which the database displays entries.

    1. Click the Presets tab
      Presets tab 

    2. On the Presets page, scroll down to the Use a preset section
      Use a present

    3. Select the preset (eg Image gallery) and click Choose. Note that a field for tags will be automatically added, but will not be visible on this page

    4. On the Field mappings page, select the Overwrite current settings check box and click Continue  you will be invited to Add entries
      Field mappings

    5. If you want to edit the preset fields, go to the Fields tab. Click on the cog wheel next to the field under the Action menu. You can also Create a new field in this screen (see instructions below)
      Edit preset fields

    Create your own fields

    You will have thought about the following questions in the database activity planning phase:

    • What fields/questions do I want my students to answer?
    • What format will my students answer in? Text? Uploading images or documents? Links?
    • What fields are required/optional?

    1. Click the Fields tab to create a new field section
      Fields tab 

    2. Choose the field type you want to create (Text area, Radio button, URL etc) from the drop-down list. For a description of what the different field types mean (eg Text area vs Text input), see Moodle Docs: Building Database
      Create a new field

    3. Enter the Field name and Field description (note: the Field description is not the instructions to the user, it is for administrator viewing only). If you need to ensure one or several particular fields are always completed, then tick the Required field box. Click Add.
      Field name and description 

    4. Once you have finished adding your fields they will appear listed in the Fields tab
    5. Next, you may want to edit the database templates to make the database entries display the way you want them. See Create templates for your database (step 3)

    Customise the database search

    Once you and your students have populated the database beyond a certain size, you'll want it to be (more) searchable. The database is searchable by default, but you can customise the search to suit the database.

    1. On the View list or Search page, deselect the Advanced search check box and click Save settings

    2. Do one of the following:

      1. Use the fields that now display below the list to conduct a simple search. To search, enter a Search term and either click Save settings or press Enter
      2. Select the Templates tab, then on the Templates page select the Advanced search template tab, and define the template to suit your and your students' needs

    » How-to glossary