Summary
Validation and verification are essential in ensuring data integrity during algorithm design and problem-solving. Validation checks if data is sensible and feasible, while verification ensures data is copied accurately.
- Validation — an automatic check to ensure that data entered is sensible and feasible. Example: Ensuring a user's age is entered as a number within a reasonable range.
- Verification — a way of preventing errors when data is copied from one medium to another. Example: Double entry where data is entered twice to ensure accuracy.
- Type Check — checks that the data entered is of an expected type, e.g., text or a number. Example: Ensuring a phone number is entered as digits.
- Check Digit — an extra digit added to a number which is calculated from the other digits. Example: ISBN numbers for books.
- Range Check — checks the data falls between an acceptable upper and lower value. Example: Validating that a test score is between 0 and 100.
- Length Check — checks the number of characters meets expectations. Example: Ensuring a password is at least 8 characters long.
- Presence Check — checks that the user has at least input something. Example: Ensuring a username field is not left blank.
- Double Entry — data is entered twice and the computer checks that they match up. Example: Entering a new password twice to confirm it.
- Visual Check — the user manually reads and compares the newly inputted data against the original source. Example: Comparing a printed document with its digital version.
Exam Tips
Key Definitions to Remember
- Validation: An automatic check to ensure data is sensible and feasible.
- Verification: Ensures data is copied accurately from one medium to another.
- Type Check: Ensures data is of the expected type.
- Check Digit: An extra digit for verifying the accuracy of a number.
- Range Check: Ensures data falls within a specified range.
- Length Check: Ensures data meets the expected number of characters.
- Presence Check: Ensures that data is not left blank.
Common Confusions
- Validation ensures data is correct — it only checks if data is sensible.
- Verification checks data accuracy — it only ensures data matches the original.
Typical Exam Questions
- What is validation? Validation is an automatic check to ensure data is sensible and feasible.
- How does verification differ from validation? Verification ensures data is copied accurately, while validation checks if data is sensible.
- Give an example of a range check. Ensuring a temperature value is between -50 and 50 degrees.
What Examiners Usually Test
- Understanding the difference between validation and verification.
- Examples of different validation methods.
- How verification methods ensure data accuracy.