The trip form that went wrong
A school trip form is typed into a computer. Look at the list.
Sam is 160 years old. Aisha has two rows. Leo lives at "LS1 1AB" on one list and "LS1 1BA" on another. The bus company sends the tickets to the wrong place.
Six checks can stop this. You will learn all six.
Key words
| Word | What it means | Example |
|---|---|---|
| Validation | A check that data is sensible and in the right shape. | An age of 160 is refused. |
| Verification | A check that data was copied or typed in correctly. | Type your email twice. |
| Reliability | Data you can depend on, from a trusted source. | A school office list |
| Consistency | The same fact is the same everywhere it is kept. | One address, two lists, no difference. |
| Integrity | Data stays complete, correct and joined up. Nothing is lost or damaged. | A ticket always points to a real student. |
| Redundancy | The same data kept more than once when it is not needed. | Aisha twice in one list |
| Record | One row of data about one thing, such as one student. | Sam, 16, LS1 1AB |
| Range check | A validation rule: the value must be between two limits. | Age from 11 to 19 |
The cells students fill in are left blank in this preview.
Validation: is it sensible?
Validation checks that data is sensible and in the right shape. The computer does it by itself, when the data goes in.
Age 160? Refused. A postcode with no space? Refused. An empty name? Refused. Validation is a gate at the door.
Quick check: validation
Have a go
Quick check: validation
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Try it: validation is not proof
age = 17 # the student is really 16
if 11 <= age <= 19:
print("Valid: the age is sensible.")
else:
print("Refused.")
# Validation says yes, but the age is wrong.
# Change 17 to 160 and press Run again.
Verification: was it typed right?
Verification checks that the data was copied or typed in correctly. The age 17 passes validation, but only a second look shows it should be 16.
Common ways: type the data twice (double entry), or ask a person to read it back and check.
Four more ideas
Reliability: you can depend on the data. It comes from a trusted source and does not change by itself.
Consistency: the same fact is the same in every place. The address is not different on two lists.
Integrity: the data is complete and not damaged. Every ticket points to a real student.
Redundancy: needless copies. Aisha is on the list twice.
Quick check: the four ideas
Have a go
Quick check: the four ideas
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.