An advantage of electronic databases are the validation checks available:
A presence check makes the person using the database enter something in this field. They cannot leave it blank. For example, when signing up for a new account on a social media platform, you cannot leave the password field empty.
Restricted choice cuts down on mistakes by only letting you select an option from a menu or list.
Field length restricts the number of characters typed. This can cut down on the total data requirements of the table.
A typical length check could be used on a National Insurance number field to only allow up to nine characters. This can also stop people from mistyping their NI number by adding in too many characters.
A range check makes sure data entered is within certain limits. This could be used to make sure the user enters a number ˃=1 and ˂=12 if they were entering their month of birth, or that they enter a number ˃=11 and ˂=16 for the database of school pupils between these ages, as shown in the image below.
The data dictionary for the sports centre tables is shown below. Some of the attributes in each table make use of validation.
|Surface ID||PK||Text||4||Yes||Length = 4|
|Supplier||Text||Restricted Choice: Surface4U, We Lay, Council|
|Cost per m2||Number|
|Area ID||PK||Text||3||Yes||Length = 3|
|Surface ID||FK||Text||4||Yes||Length = 4, linked to SurfaceID in Type of Surface entity|
|Hire Cost||Number||Range >=2 and <=80|
The required column of a data dictionary is used to indicate the need for presence check validation. If the word ‘Yes’ appears in this column, the developer will know that they need to include a presence check when creating the table in a database package.