🔍

Essential Concepts of Validation and Verification

Sep 25, 2024

Lecture Notes: Validation and Verification

Introduction

  • Validation and Verification are distinct concepts important for exams.
    • Validation: Ensures sensible data entry.
    • Verification: Ensures data matches the original source.

Validation

Definition

  • An automatic computer check at data entry.
  • Ensures data is sensible and reasonable.
  • Does NOT ensure data accuracy.

Importance

  • Prevents program crashes due to abnormal data.
  • Easier to prevent poor data at entry than to fix later.
  • Assumes users may enter incorrect data; systems should be idiot-proof.

Examples

  • Restaurant Booking System:

    • Missing contact info or booking details if no validation.
  • Integer Input:

    • Expect whole numbers between 1 and 10.
    • Validation stops incorrect entries like '5.7' or '11'.

Limitations

  • Cannot ensure data accuracy.
  • Examples:
    • Gender entry 'M' or 'F' may still be incorrect.
    • Postcodes may follow format but be outdated.
    • Emails can match patterns but have typos.
    • Test scores may be technically valid but incorrect.

Validation Methods

  1. Range Check: Ensures data falls within a specific range.

    • E.g., age or score validations.
  2. Type Check: Checks data type (e.g., number vs text).

  3. Length Check: Ensures enough characters are entered.

    • Common in password criteria.
  4. Presence Check: Ensures a field is not left empty.

  5. Check Digits: Extra digit ensuring number sequence correctness.

Verification

Definition

  • Ensures data copied from one medium matches the original.

Differences from Validation

  • Does not check data makes sense.
  • Focuses on identical data transfer.

Methods of Verification

  1. Double Entry: Enter data twice to confirm match.

    • Common in passwords and email confirmations.
    • Uncommon for lengthy texts like essays.
  2. Visual Check: Manually compare the original and new data.

    • E.g., comparing written account numbers with online entries.

Conclusion

  • Validation: Ensures sensible data entry to minimize future issues.
  • Verification: Confirms accurate data transfer between mediums.
  • Understanding both is critical for effective data management.