ExamYard Lectures

Validation and verification

A Level Computer Science 9618 · Chapter 6, Security, privacy and data integrity · 5-minute lecture

The teaching part (1 min) is free to watch. A free account opens the whole lecture: 5 practice questions, 1 real past-paper question with the answer explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.

What this lecture covers

  1. Sensible is not the same as correct
  2. Validation checks
  3. What validation cannot do
Read the transcript of the teaching part

Last time

Before we start: last time, in Security, privacy and integrity, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.

Sensible is not the same as correct

Type your age as two hundred and the computer should refuse it. That is validation: is the data sensible? But type thirty-four instead of forty-three and the computer cannot know. That is the job of verification: was the data copied correctly?

Validation checks

A range check makes sure a value lies between limits. A mark must be between zero and the maximum. A length check tests the number of characters. A presence check makes sure something has been entered. A type check tests the data type. A format check tests a pattern, such as two letters, two digits and a letter. A check digit is a calculated digit that is tested.

What validation cannot do

Validation only checks that data is reasonable. A mark of 56 passes a range check even if the true mark was 65. So validation does not prove the data is correct. Verification is used as well.

Chapter 6: Security, privacy and data integrity

Also for A Level Computer Science 9618

Which topics come up most in A Level Computer Science 9618 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.