Data Validation
Data validation checks that the data is sensible before it is processed.

Methods used for validation are...

range check This checks that the data lies within a specified range of values.

Eg the month of a person's DOB should lie between 1 and 12

presence check This checks that important data is actually there and has not been missed out.

Eg Customers may be required to have their telephone numbers.

type check A check that data is of the right type.

 Eg number, text etc

length check Checks that fields have the correct number of characters.

Eg A bank account number may always be 10 digits long.

check digits Used for numerical data. An extra digit is added to a number which is calculated from the other digits. The computer checks this calculation when data is entered.

Eg The ISBN number on a book. The last digit is a check digit.

batch totals This checks for missing records. Numerical fields may be added together for all records in a batch. The batch total is entered and the computer checks that the total is correct.

Eg Add the 'Total Cost' field of a number of transactions together.

hash totals This is just a batch total done on a meaningless field.

Eg Add the Telephone Numbers together for a number of Customers.

Presence checks can be carried out by running queries that look for 'Null' fields.

 

 

 

 

 

 

 

Exercise : Data Validation
is used to check that data is sensible before it is processed.

Methods used for validation are...

  • - used to check that important fields in records have been entered.
  • - checks to see that data lies within a range of values.
  • - an extra digit added onto a numerical field. It is calculated using the other digits of the number. The computer checks the calculation.
  • - checks for missing records. Numerical fields are added together for all the records in a batch. This sum is checked by the computer.
  • - a batch total used on a meaningless field (eg dates of birth)
  • - checks that data is of the right type (integer, text)
  • - checks that there is the correct number of characters in the data
(Green indicates success)