Data Integrity (Copy)
Cheat Sheet: A Level Computer Science – Data Integrity: Validation & Verification
1. Importance of Data Integrity
- Data integrity ensures data is accurate, reliable, and consistent throughout its lifecycle.
- Two main methods to protect integrity:
- Validation (checks if data is acceptable)
- Verification (checks if data is correct)
2. Data Validation
- Definition: Automated checks during data entry to ensure data is sensible, reasonable, and within constraints
Types of Validation Checks
| Type | Description | Example |
|---|---|---|
| Range Check | Ensures value is within upper and lower limits | Age must be between 0 and 120 |
| Format Check | Ensures data is in a specific format | Date in DD/MM/YYYY |
| Length Check | Ensures input has the correct number of characters | Postcode must be 6 characters |
| Presence Check | Ensures data has been entered and is not blank | Name field must not be empty |
| Existence Check | Ensures input exists in a database or lookup table | Product code must exist in stock database |
| Limit Check | Similar to range check, but only one bound is checked | Value must be less than 100 |
| Check Digit | Extra digit added to number to detect errors | ISBN uses check digit to validate full number |
3. Data Verification
- Definition: Confirms data is entered or transmitted accurately
- Used to ensure correctness, not just validity
Verification Methods (During Data Entry)
| Method | Description |
|---|---|
| Visual Check | User manually reviews data for correctness |
| Double Entry | Data is entered twice and compared; mismatch triggers error |
Verification Methods (During Data Transfer)
| Method | Description |
|---|---|
| Parity Check | Adds a parity bit to data to make number of 1s either even (even parity) or odd (odd parity) |
| Byte-Level Parity | Each byte checked individually with parity bit |
| Block-Level Parity | Checks across rows and columns in a block of data |
| Checksum | Total of data values is calculated and sent along; receiver recalculates and compares to ensure match |
