Describe and use methods of data verification during data entry and data transfer

6.2 Data Integrity – Keeping Your Data Safe and Sound

What is Data Integrity?

Data integrity means that the data you store, send, or receive is exactly what it was intended to be – no accidental changes, no missing bits, and no tampering. Think of it as a promise that the information stays the same from the moment you type it until it reaches its destination.

Why Do We Need Verification?

  • 🛡️ Prevents accidental corruption (e.g., bad memory, network glitches)
  • 🔒 Detects intentional tampering (e.g., hacking, fraud)
  • 📦 Ensures reliable data transfer between systems
  • ?? Helps meet exam requirements for “data verification” questions

Common Verification Techniques

Parity Bits – A single bit added to data to make the number of 1s either even or odd. Analogy: Like a “yes/no” check on a form – if the total number of checkboxes is odd, you add one more to make it even.
Checksums – A simple sum of all data bytes, often modulo 256. Analogy: The total of a grocery bill: if the sum changes, something was added or removed.
CRC (Cyclic Redundancy Check) – Uses polynomial division to produce a short “fingerprint” of data. Analogy: A fingerprint that uniquely identifies a person; if the fingerprint changes, the person (or data) has changed.
Hash Functions (SHA‑256, MD5) – Produce a fixed‑size hash from any length of data. Analogy: A unique code for a book title; if the title changes, the code changes.
Digital Signatures – Combine a hash with a private key to prove authenticity. Analogy: A signed envelope that proves it came from you.

Data Entry Verification (Getting It Right the First Time)

  1. 🔍 Input Validation – Check that the data matches the expected format (e.g., email, phone number). Use regular expressions or built‑in validation.
  2. ?? Immediate Feedback – Show a green checkmark or red cross as the user types.
  3. 🔁 Confirmation Step – Ask the user to confirm critical data (e.g., “Is this your email?”).
  4. 📦 Use Constraints – Set min/max lengths, required fields, and data type restrictions in the database.

Data Transfer Verification (Keeping It Safe on the Move)

  1. 📦 Checksum or CRC – Attach a checksum to each packet. The receiver recomputes and compares.
  2. 🔒 Secure Protocols – Use HTTPS, SFTP, or TLS to encrypt and authenticate.
  3. 🧪 Error‑Correcting Codes – Add redundancy so the receiver can fix some errors (e.g., Hamming code).
  4. 🔍 Digital Signatures – Verify that the data came from a trusted source.

Example: Simple Checksum Calculation

Suppose we send the ASCII string "HELLO". Each letter has a numeric value:

Letter ASCII
H 72
E 69
L 76
L 76
O 79

Checksum = (72 + 69 + 76 + 76 + 79) mod 256 = 372 mod 256 = 116.

Receiver recomputes 116 and confirms the data is intact.

Exam Tip Box

Tip 1: When asked to calculate a checksum, show the step‑by‑step addition and the modulo operation.

Tip 2: For CRC, explain the polynomial division process and why it catches burst errors.

Tip 3: Use LaTeX for formulas: e.g., $C = \sum_{i=1}^{n} x_i \bmod 256$.

Tip 4: Remember the difference between verification (checking correctness) and authentication (proving source).

Quick Recap (Flashcards)

  • 📦 Checksum – Simple sum, fast, good for small data.
  • 🔁 CRC – Polynomial, catches more error patterns.
  • 🔒 Hash + Signature – Ensures authenticity and integrity.
  • 🛠️ Validation Rules – Prevent bad data at entry.

Revision

Log in to practice.

2 views 0 suggestions