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. In the Presets page, scroll down to the Use a preset section
      data preset field

    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, click on the cog wheel next to the field in the Fields tab. You can also Create a new field in this screen (see instructions below)
      edit fields

    Create your own fields

    You will have thought about these 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
      database fields tab

    2. Choose from the drop-down list the field type you want to create (Text area, Radio button, URL etc). 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

      create a new field - options


    3. Once you choose a field type, in the next screen enter the Field name and Field description, tick if it is a Required field, and click Add. (Note: The Field description is not the instructions to the user, it is for administrator viewing only.)
      database field details

      Please note that a field for tags will be automatically added, but will not be visible on this page.

    4. Once you have finished adding your fields they will appear listed in the Fields tab

      database fields added

    5. Click Save
      Fields example

    6. Clicking Save takes you to the Templates > Single template screen. Click Save template. 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
      database search button

    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
        OR
      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