Information Technology Topic

Validation and Verification

  1. Read notes
  2. Flashcards
  3. Quiz
  4. Confident

Study focus - 3 things

  1. Validation checks that an entry is allowed and sensible by examining the data itself; verification checks that the entry matches the original source. Valid is not the same as correct
  2. Know the four validation checks and what each one tests: range (fixed limits), reasonableness (believable for the situation), data type (right kind of data) and inconsistency (two fields in one record contradict each other)
  3. Limits count: a range of 0 to 100 accepts both 0 and 100. And always ask which check could catch a given error, because a wrong-but-plausible entry such as 13 instead of 14 slips past every validation check

Section 1Why entered data needs checking

A computer stores whatever it is given. If a clerk types 140 as the age of a Grade 9 student, the system keeps 140 unless something stops it. Bad data in means bad information out. There are two separate jobs. Validation checks that the data is acceptable. Verification checks that the data matches the original. This topic covers the difference between them and four validation checks: range, reasonableness, data type and inconsistency.

Section 2Validation versus verification

Data validation means checking entered data for errors or omissions that can be found just by examining the data. The computer asks: could this entry be right? It does not know the real answer. It only applies rules. Data verification means checking that what was entered matches the original source, such as the paper form. It asks: is this exactly what the source says? Easy to mix up: a value can be valid and still wrong. An age of 13 is allowed for a Grade 9 student. If the form says 14, though, the entry is not accurate. Validation passes it, and only verification against the form catches it. It works the other way round too. If the form itself says 140 and the clerk copies 140 perfectly, verification passes but validation rejects the entry. Some large organisations even test their data-entry staff on batches with known answers and track each person's error rate.

Section 3Range check

A range check tests that a value lies between a lowest and a highest allowed value. For marks out of 100, the limits are 0 and 100, and both limits count as allowed. So 85 passes, 100 passes (it equals the upper limit), and 0 passes. 101 and -5 fail. Here's the trick: a range check uses fixed limits that come from what is possible, and the same limits apply to every record. There are 24 x 7 = 168 hours in a week, so hours worked above 168 can never be right. An age range of 0 to 120 rejects 140 for any person. Watch out: always say whether the limits are included. In this topic, as on most forms, the limits themselves are allowed.

Section 4Reasonableness check

A reasonableness check asks whether a value is believable for the situation, even though it is technically allowed. It compares the value with what you would expect. On a Grade 9 class list, ages from 11 to 17 are what you expect. The age field also has a range check of 0 to 120. An age of 14 passes both checks. An age of 90 passes the range check but the reasonableness check flags it, because a person can be 90 but a Grade 9 student almost never is. An age of 140 fails both. A part-time cashier in a Mandeville shop usually works 5 to 25 hours a week. An entry of 80 passes a 0 to 168 range check, but the reasonableness check flags it. Easy to mix up: range limits come from what is possible, reasonableness comes from what is likely.

Section 5Data type check

A data type check tests that the entry is the right kind of data for the field: a whole number, a number with decimals, or a date. In a whole-number field, 4 passes but the word four fails, and 4.5 fails too because it has a decimal part. In a number field, 4.5 passes. Typing errors count: 25O, with the letter O instead of a zero, is text, so it fails in a number field. For a date field the entry must be a real calendar date. 29 February 2012 passes, because 2012 is a leap year. 29 February 2011 fails, and so does 31 April 2012, because April has only 30 days. In a database each column has a fixed data type, so the system can apply this check itself. Do this check first, because range and reasonableness cannot be worked out on a word.

Section 6Inconsistency check

An inconsistency check compares two or more fields in the same record. Each value may look fine by itself, but together they contradict each other. Take a form dated 14 September 2026 with a date of birth of 9 March 2012. The age should be 14. If the age field says 12, the check flags the record. Birthdays matter: a student born on 20 September 2012 is still 13 on 14 September 2026, because the birthday has not come yet. A student born on 14 September 2012 turns 14 that very day. Another pair: a library record where the book was returned on 2 October 2026 but borrowed on 5 October 2026. Both are real dates and both are in range, so only a check across the two fields can spot the problem.

Section 7Choosing a check, and what validation cannot do

Each check catches a different kind of error, so forms usually use several. A mark of 101: range check. An age of 90 for a Grade 9 student: reasonableness check. The word four in a whole-number field: data type check. An age of 12 with a date of birth of 9 March 2012: inconsistency check. An age typed as 13 when the form says 14: none of them, only verification. Watch out: passing every validation check does not make data correct. It only means the data is possible, believable, the right type and consistent. Choosing checks for a whole scenario, and ways of carrying out verification, are the job of the next topic, Choosing Validation and Verification Checks.

Examples

A teacher in Portmore types marks out of 100 into a class sheet. The range check accepts whole numbers from 0 to 100, with both limits allowed. Five entries are typed: 85, 100, 101, -5 and 0. (a) State which entries are accepted and which are rejected. (b) Explain why 100 is accepted. (c) The paper mark sheet says 87 but the teacher types 78. Explain what the range check does with 78, and name the process that could catch the slip.

(a) Test each entry against the limits 0 and 100. 85: between 0 and 100, accepted. 100: equal to the upper limit, accepted. 101: above 100, rejected. -5: below 0, rejected. 0: equal to the lower limit, accepted. (b) Both limits are included, so a value equal to the highest allowed mark passes. Only values above 100 or below 0 fail. (c) 78 lies between 0 and 100, so the range check accepts it. The slip (the digits swapped) makes the entry wrong but valid. Validation cannot know the real mark. Verification, comparing the typed 78 with the paper sheet's 87, would show a mismatch.

A school in Mandeville enters Grade 9 registration forms. The form date is 14 September 2026. The age field has these checks: it must be a whole number (data type), 0 to 120 (range), and 11 to 17 is the expected age for the class (reasonableness). The computer also checks that the age agrees with the date of birth (inconsistency). All four forms below have a date of birth of 9 March 2012, which makes the student 14 on the form date. Form A: age typed as 14. Form B: age typed as the word fourteen. Form C: age typed as 140. Form D: age typed as 12. (a) For each form, state which checks reject it, listing them in the order data type, range, reasonableness, inconsistency. (b) Explain why Form D gets past three checks but not the fourth. (c) Explain what extra step is needed to find out whether the age or the date of birth was typed wrongly on Form D.

(a) Run each age through the four checks. Form A: 14 is a whole number, inside 0 to 120, inside 11 to 17, and agrees with the date of birth (age 14). No check rejects it, so it is accepted. Form B: the word fourteen is not a whole number, so the data type check rejects it. The other checks cannot be worked out on a word. Form C: 140 is a whole number, so data type passes. It is above 120, so the range check rejects it. It is outside 11 to 17, so the reasonableness check rejects it. It does not agree with the date of birth, so the inconsistency check rejects it too. Three checks reject Form C. Form D: 12 is a whole number, inside 0 to 120 and inside 11 to 17, so data type, range and reasonableness all pass. But 9 March 2012 gives an age of 14 on 14 September 2026, not 12, so only the inconsistency check rejects it. (b) Each of the first three checks looks at the age on its own, and 12 is a perfectly sensible age. Only the inconsistency check puts the age beside the date of birth and sees that they contradict each other. (c) The computer knows the two values disagree but not which one is wrong. A person must compare the record with the source form, which is verification, and then correct whichever field was mistyped.

Now let's water it

Session runs notes to flashcards to quiz back-to-back.

Where this comes from