Validation, verification and trace tables
Checking and tracing
- When data is entered, we check it to reduce mistakes.
- Validation checks it is sensible; verification checks it was copied correctly.
- A trace table follows an algorithm step by step.
Validation
- Validation checks data is sensible and follows the rules (it can't check the data is true).
- Range check (between limits), length check (right number of characters), type check (right kind of data), presence check (not blank), format check (right pattern, e.g. dd/mm/yyyy), and a check digit (an extra digit confirming a number).
Checking that an age is between 0 and 120 is a:
A range check confirms a value lies within allowed limits.
Match each validation check to its purpose.
Presence = not blank; type = right kind of data; format = right pattern.
Verification
- Verification checks data was copied or entered correctly (no typing mistakes).
- Visual check — a person compares the typed data with the original.
- Double entry — the data is entered twice and the two copies are compared.
Verification (not validation) checks that:
Verification compares the entered data with the original; validation checks the data is sensible.
Entering data twice and comparing the two copies is:
Double entry is a verification method — the two copies must match.
Trace tables and test data
- A trace table records each variable's value as an algorithm runs — to check it works or to find out what it does.
- Test data types: normal (accepted), abnormal (rejected), extreme (largest/smallest allowed), boundary (the values on each side of a limit, e.g. 120 and 121).
A trace table is used to:
Tracing helps you check an algorithm works, or work out what it does, by following the variables.
You've got it
- validation = is it sensible? (range, length, type, presence, format, check digit)
- verification = was it copied correctly? (visual check, double entry)
- a trace table tracks variable values step by step
- test data: normal, abnormal, extreme, boundary
For an age 0–120, which pair is boundary test data?
Boundary data sits on each side of a limit — one accepted (120), one rejected (121).