Adding Database Fields

Margarita Berezyanskaya

Last Update vor 2 Monaten

1. From the course home page, click on a new Database activity that does not yet have Fields added to it. Or, see the Adding a Database Activity to a Course article for instructions on how to add a new Database activity to your course.


2. The image below shows the Database activity page. The heading is the activity name and there is a row of tabs that allow a teacher to


(1) see a list of entries, 

(2) look at the entries one at a time, 

(3) find specific entries in the Database

(4) add new entries, 

(5) create Excel or OpenOffice spreadsheet files for use in/outside of the online course, 

(6) edit the various Templates to change the appearance on each tab, 

(7) create/choose/edit the Fields for the Database, and 

(8) access/create Presets for the Database. There is also a 

(9) Create a new field drop-down menu, and 

(10) drop-down choices for the Default sort field.



Important Note: Before you begin to add new Fields to a Database, be sure to have a list of the Fields you want to create, and a plan for the appearance of the Add entry template that students will use to add their entries. Adding the Fields in the order you want them to appear for students will save you a lot of time in the following steps.
3. Click on the Create a new field drop-down menu to select the desired Field for the new Database. The options are: Checkbox, Date, File, Latlong (latitude and longitude), Menu, Multimenu, Number, Picture, PoodLL, Radio button, Text area, Text input, and URL.



4. Clicking on Checkbox will open the Checkbox field page. Type the Field name that will appear for students on the Add entry and other tabs in the Database.



5. Type the Field description, this text will appear to students if they hover their mouse over the Checkbox field options in the form on the Add entry tab.


6. Click in the Required field checkbox if it is an essential field to be answered in the database.


7. Finally, type the Options (one per line) that students will have to choose from. The Checkbox field allows students to choose more than one option. If you only want them to have one choice, use the Radio button field (described below) instead.


8. When this is done, click on the Add button to create the Checkbox field.


9. A green message saying Field added appears and the Checkbox field is visible in the table. You can use the Create a new field drop-down menu to continue adding new fields.



At this point, you can view the new Field by clicking on the Add entry tab. The options appear as Checkbox fields for students to choose one or more.



10. Click on the Fields tab to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Date field will open a new page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the Date field drop-down menus in the form on the Add entry tab.


11. When this is done, click on the Add button to create the Date field.



12. When the Date field has been added, click on the Add entry tab to view the new addition to the Database, or continue creating new Fields


The image below shows the Checkbox field and the new Date

field that has been added using the Add entry tab.



13. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the File field will open a new page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the File field upload window in the form on the Add entry tab.


Check the box close to Required field if uploading a file is mandatory.


Finally, set the Maximum size for file uploads with the drop-down selections.
Note: If a larger Maximum size is required, the Course upload limit can be changed by going to the Administration block and selecting Edit settings under Course administration on your course page.

When this is done, click on the Add button to create the File field.



At this point, you can view the new File field by clicking on the Add entry tab.


14. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Latlong field will open a new page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database


Type the Field description. This text will appear to students if they hover their mouse over the Latlong field in the form on the Add entry tab.


Check the box close to Required field if responding to this Field is mandatory.


Choose the Link-out services to display for the destination of the hyperlink that appears in completed entries in the Database by selecting from the menu. For the How to label items in KML files (Google Earth) selections, you can choose from the drop-down menu options.



Important Note: If you plan to use the Latlong field in your Database, students will need skill-building/assistance finding latitude and longitude coordinates for a particular location online (for example: 45.423609, -75.700940). See the Help links below for more detail on the Latlong field.
When this is done, click on the Add button to create the Latlong field.



At this point, you can view the new Latlong field by clicking on the Add entry tab.


15. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Menu field will open a new page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description. This text will appear to students if they hover their mouse over the Menu field drop-down choices in the form on the Add entry tab.


Finally, type the Options (one per line) that will appear in the drop-down menu for students to make their selection.


Check the box close to Required field if responding to this Field is mandatory.


When this is done, click on the Add button to create the Menu field.



At this point, you can view the new Menu Field by clicking on the Add entry tab.


16. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database.


Selecting the Multimenu field will open the Multiple-selection menu field page.


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description. This text will appear to students if they hover their mouse over the Multimenu field menu choices in the form on the Add entry tab.


Finally, type the Options (one per line) that will appear in the drop-down menu for students to make their selection(s).


When this is done, click on the Add button to create the Multimenu field.



At this point, you can view the new Multimenu Field if you like by clicking on the Add entry tab.

Important Note: Students must use the Ctrl or Shift keys to make multiple selections from the menu options on the Add entry tab. They may need skill-building and assistance to use the Multimenu field.
17. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database
Selecting the Number field will open the Number field page. 

Type the Field name that will appear for students on the Add entry and other tabs in the Database.

Type the Field description, this text will appear to students if they hover their mouse over the Number field in the form on the Add entry tab.
Check the box close to Required field if responding to this Field is mandatory.

When this is done, click on the Add button to create the Number field. At this point, you can view the new Number field by clicking on the Add entry tab.



18. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Picture field will open the Picture field page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the Picture field upload window in the form on the Add entry tab.


Check the box close to Required field if responding to this Field is mandatory.


Enter the Width in single view, Height in single view, Width in list view, Height in list view, and the Maximum size for picture uploads.
Note: If a larger Maximum size is required, the Course upload limit can be changed by going to the Administration block and selecting Edit settings under Course administration on your course page.
When this is done, click on the Add button to create the Picture field. At this point, you can view the new Picture field by clicking on the Add entry tab.



19. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Radio button field will open the Radio button field

page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the Radio button field options in the form on the Add entry tab.


Finally, type the Options (one per line) that students will have to choose from. The Radio button field allows students to choose only one option.


Check the box close to Required field if responding to this Field is mandatory.


If you want students to have more than one choice, use the Checkbox field (described above) instead. When this is done, click on the Add button to create the Radio button field.



20. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database


Selecting the Text area field will open the Text area field page. Students can type larger amounts of text in the Text area field than in the Text input field (see below).


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the Text area field options in the form on the Add entry tab.


Check the box close to Required field if responding to this Field is mandatory.


Enter the Width in columns, Height in rows, and the Maximum embedded file size (bytes), which if set to zero will be unlimited by default.


When this is done, click on the Add button to create the Text area field. 


At this point, you can view the new Text area field by clicking on the Add entry tab.


21. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database.


Selecting the Text input field will open the Text field page. Students can only type up to 60 characters with the Text input field, if more space is required, use the Text area field instead (see above).


Type the Field name that will appear for students on the Add entry and other tabs in the Database.


Type the Field description, this text will appear to students if they hover their mouse over the Text field in the form on the Add entry tab.



Check the box close to Required field if responding to this Field is mandatory.


Check the Allow autolink checkbox if you want to activate autolinking.


When this is done, click on the Add button to create the Text field.


At this point, you can view the new Text field by clicking on the Add entry tab.
Note: Autolinking is a feature of Moodle that words or phrases used within a course are automatically linked to a glossary and database entries. If the database or glossary terms appear in your course, the students can click on them to see the definition or database entry related to that term.
22. Click on the Fields tab again to create another field. Click on the Create a new field drop-down menu to select the next Field for the new Database.


Selecting the URL field will open the URL field page. 


Type the Field name that will appear for students on the Add entry and other tabs in the Database


Type the Field description, this text will appear to students if they hover their mouse over the URL field in the form on the Add entry tab.



Check the Autolink the URL checkbox if you want the hyperlink to be clickable. Check the Open link in new window checkbox to have students retain the Database activity page when the hyperlink opens. Check the box close to Required field if responding to this Field is mandatory. Add text to the Forced name for the link field if you want all entries to show the same text for the hyperlink in the URL field.


When this is done, click on the Add button to create the URL field.


At this point, you can view the new URL field by clicking on the Add entry tab.


23. When all the Fields have been added to the Database activity, click on the Add entry tab to view the default Add entry template, and/or to add a model/example entry for the students to view. When teachers or students have finished filling in the form, there is the choice to Save and view the new entry, or to Save and add another new entry.


As you can see in the image below, the default Templates are not always ideal or engaging to the eye. For instructions on how to edit and format the Templates to give them some colour and context, please see the Editing Database Templates article.



Note: Fields in the example Test Database activity were created solely for this article and are not meant to make sense together in a rational way, but rather to demonstrate the many possible Fields to choose from in the Database activity module.

Resources