For this task you will:
As you know data is stored in records in a database. Each individual piece of data contained in the record is stored in a field. When storing data in a field you need to know what 'data type' it should be stored as.
In the table below you can see the data types available in Microsoft Access. This can also be seen in a Word document. Click here to view the Word document.
TEXT |
Text or combinations of text and numbers, as well as numbers that don’t require calculations, such as telephone numbers. Up to 255 characters in length. |
MEMO |
Lengthy text or combinations of text and numbers. Up to 65,535 characters in length. |
NUMBER |
Used for storing numbers that can be used in calculations. |
DATE/TIME |
Used for storing dates and times |
CURRENCY |
Used for storing monetary values and numeric data used in calculations, using from 1 to 4 decimal places |
AUTO NUMBER |
These are numbers allocated by the computer. The numbers are usually allocated in sequence. |
YES/NO |
Used for storing data such as Yes/No, True/False |
OLE OBJECT |
An object (such as Microsoft Excel spreadsheet, a Microsoft Word document, graphics, sounds or other binary data) linked to or embedded in a MS Access table |
HYPERLINK |
Text or combinations of text and numbers stored as text and used as a hyperlink address. |
LOOKUP WIZARD |
Creates a field that allows you to choose a value from another table, or from a list of values by using a list box or combo box. |
For task 4 part 1 you have to create a database for all the cast members. You must include the fields below. For each field you need to decide the correct data type.
Parts should include Joseph, his 11 brothers, his mother and father, Pharaoh, Potiphar and his wife, jailer, baker and butler. (Use the names of pupils in your class and/or any others you wish. Decide whether or not a costume needs to be hired or made). You play the part of Joseph.
There are some important facts to note about data types:
In task 2 you will be shown how to set up a 'Look up wizard'. Below is a screen shot of how they work once they have been set up. In this example a look up has been set up for the 'Gender' field, given the value 'M or F'.

It is important that each record in the database is unique so that data can be searched for. Which field can be used from the fields given above for a 'unique' field. Surname? Forename? Year?
None are suitable as many people have the same surname and forename, and sometimes people who have the same surname and forename live at the same address. Therefore we need to create a unique identifier for every record. One way of doing this is by including an 'ID' field.
'ID' fields can be given the data type 'Autonumber'. This will means that every record in the database is given a unique number when created. This helps prevent duplication of data. An example of this can be seen below.

For homework complete the 'Pupils Data Types Exercise...' sheet by adding the fields shown above and choosing the correct data type.
The 'ID' field has already been completed for you.
When completing the homework sheet you also need to give consideration to the fields 'Field size', 'Required?', 'Description'.
Databases can contain a large amount of data. One way of reducing the amount of data is by making sure the 'Field size' is just big enough to hold the data. Otherwise the field size is automatically set to '50'. This means it can hold a maximum of 50 characters - either text or numbers.
Think about the field size when you plan out your database table. What is the minimum size required for the:
The required field serves to make sure that important data must be entered into the database. If you make a field 'required' then data has to be filled in or the software will not allow you to go any further.
Which fields must be required for the cast table?
The description field is needed when you decide to use abbreviations for your field names. For example you could shorten the Surname field name to just 'SN'. You would then include a 'Description' to explain what the abbreviation means.
By using abbreviations you are also making sure that your database does not get too large!
Note: You cannot begin Task 2 if you have not planned out your database first!