Posted by admin on 5th May 2011

Validation and Verification

If you get asked about Validation and Verification it will probably be in a database question – although sometimes it might fit in with spreadsheets or a web site question.

Put simply, they are both ways of making sure you have good quality data entered into your software – but remember, good quality does not mean true or correct. You can’t guarantee correct as mistakes or lies can get through either validation or verification.

Verification

Verification is all about checking or double checking. A very simple form of verification is double entry – for example, when you change your password on the computer or on a website, you have to type the new one twice. This verifies that you have entered it the same both times, making it less likely that there’s a mistake or typo.

Sometimes a mail-order catalogue company would have two different typists enter data from the hand-written order onto the computer system. When the two are compared, if they match it makes the it less likely that a mistake has been made, but if they’re different, someone else will check what’s wrong.

Validation

Validation checks the data that’s entered against a validation rule. If the data is allowed by the rule it goes into the system, if not and error message can be displayed. The simplest example is a type check – letters cannot be entered into a ‘number field’ in a database (look up datatypes if you’re not sure about this.)

When validating a month, we can use a list verification to check that what is entered is on the list – if not, it can’t be a real month. 

 We can use a validation rule to make sure that a postcode is entered with the right number of letters and numbers in the right order. This would be a complex validation rule called a format check to make sure the data entered is the right format.

Sometimes we can set limits on a field – for example we know that the day part of a date cannot ever be greater that 31. A range check would allow 30 but not 32 in that field.

Presence checks mean that you cannot leave that field blank. For example, when you sign up for a website, you cannot join without choosing a username – an error message will display if you leave it blank.

Check digits can be used to make sure a barcode or account number have been entered correctly. A calculation is done on the numbers entered and the last digit should be the same as the output of that calculation. That’s how the checkout at the supermarket never gets the wrong product – it beeps when the validation is passed, if not the barcode needs to be scanned again.

That’s a very quick overview of validation and verification. Think about some more ways that you could use each of them in real life.

No comments yet!

Post your comments