Validation vs Verification
Introduction
Once you have collected some or all of your data, you will need to enter it into your system.
It is at this point where many different types of errors can occur, coining the phrase Garbage In Garbage Out (GIGO). Basically, if you enter data which contain mistakes and errors then, no matter how thorough or clever your queries are, you will always get second rate, error laden results.
To date, there is no 100% guaranteed foolproof method for entering data into a system which is completely error free. However, there are techniques that you can use to help you reduce the errors to a minimum.
Two of these techniques are called Validation and Verification.
Validation
Validation is one way of trying to reduce the number of errors in the data being entered into your system.
The validation is performed by the computer where you enter the data. It is the process of checking the data against the set of validation rules which you set up when developing your new database system.
| DEFINITION: Validation aims to make sure that data is sensible, reasonable, complete and within acceptable boundaries |
It is critical that you understand what this definition means and can repeat it when asked in an examination question.
Students regularly say in exam answers that "validation checks that the data is correct". It does NOT !!
If you enter "Smithe" instead of "Smith" or "07/08/07" instead of "08/07/07", no amount of validation in the world will pick up that human error.
So while Validation can help to reduce the number of errors when entering data, it cannot stop them - be very clear about it.
Range Check
A range check is commonly used when you are working with data that consists of numbers, currency or dates/times.
A range check allows you to set boundaries:
| Boundary | Description | Validation |
| Upper limit | The maximum price of any item in a shop is $100 | <=100 |
| Lower limit | In a shop, you cannot sell a negative number of items, however you can sell no items | >=0 |
| A range | To achieve a B grade, you must score between 75% - 84% | >=75 AND <=84
between 75 and 84 |
Type Check
When you set up a new system you will choose the most appropriate data type for each field.
A type check will ensure that the correct type of data is entered into that field.
For example, in a clothes shop, dress sizes may range from 8-18. A number data type would be a suitable choice for this data. By setting the data type as a number, only numbers could be entered e.g. 10, 12, 14 and you would prevent anyone trying to enter text such as "ten" or "ten and a half".
Some data types can perform an extra type of check.
For example, a date data type will ensure that a date that you have entered can actually exist e.g. it will not allow you to enter the date 31/02/15
Length Check
Sometimes you may have a set of data which always has to be the same number of characters.
For example, an Australian Land Line Phone number has 8 numbers (or 10 including Area Code).
A length check could be set up to ensure that exactly 8 (or 10) numbers are entered into the field. This type of validation cannot that the 8 numbers are correct, but it can ensure that 7 or 9 numbers aren't entered.
This also applies to the Australian Postcode, which must be exactly 4 numbers long.
Lookup
Where you have a field which contains a limited list of items which will be regularly entered then a lookup list can help reduce errors.
For example:
- A shop might put the dress sizes into a lookup list
- A car showroom might put the car models into a lookup list
- A vet might list the most popular type of animals that they are dealing with
The benefits of a lookup list are that they:
- Speed up data entry because it is usually much faster to pick from a list than to type each individual entry.
- Improve accuracy because they reduce the risk of spelling mistakes
- limit the options to choose from by presenting the required options
However, using lookup validation techniques does not prevent someone from still entering data into the field and so mistakes can still be made
Presence Checks
There might be an important piece of data that you want to make sure is always stored.
For example, a school will always want to know an emergency contact number, or a video rental store might always want to know a customer's address, a wedding shop might always want a record of the bride's wedding date.
A presence check makes sure that a critical field cannot be left blank, it must be filled in. If someone tries to leave the the field blank, then an error message will appear and you won't be able to progress to another record or save any other data which you have entered.
Verification
It was mentioned earlier that validation cannot make sure data that you enter is correct, it can only check that it is sensible, reasonable and allowable.
However, it is important that the data in your database is as accurate as possible.
Verification can be used to help make sure that the date in your database contains as few mistakes as possible.
| DEFINITION: Verification means that the data on the original source documents is identical to the data that you have entered into the system or object document. |
Verification Methods
Verification can be performed in a few ways:
Entering the data twice.
Think about when you enter a new Password, you have to type it in twice. This lets the computer check if you have typed it exactly the same both times and not made a mistake. It verifies that the first version is correct by matching it against the second version.
Whilst this can help to identify many mistakes, it is not ideal for large amounts of data:-
- it would / could take a person a lot of time to enter the data twice.
- They could enter the same mistake twice, so it would not get picked up
- You would end up with two copies of the data.
Checking the data on the screen against the original paper document
This saves having to enter the data twice. It can help pick up errors where data has been entered incorrectly or transposed.
However, it is not always easy to keep moving your eyes back and forth between a monitor and a paper copy. Also, if you are tired or your eyes feel "blurry" then you might miss errors.
Printing out a copy of the data and comparing the printout to the original paper document.
This is probably the easiest of the verification methods because you can have both copies side by side and scan both for mistakes.
However, it can be time consuming if there is large amounts of data to check and if you do it too quickly, mistakes could be overlooked.