Data integrity means that data is accurate, complete, and unaltered since it was last verified. Without it, decisions based on that data — from hospital records to bank transactions — could be dangerously wrong. Maintaining integrity requires a combination of security measures, validation, and regular verification.
What exactly does data integrity mean?
Data integrity has two related meanings that GCSE students must understand:
- Storage integrity — data stored on a disk or in a database has not been corrupted (accidentally changed by hardware failure, software bugs, or transmission errors).
- Input integrity — data entered into a system is accurate and in the expected format (the right type, range, and structure).
A practical definition: data has integrity if it means what it is supposed to mean. A patient's blood type recorded as "B+" has integrity; "B " (with a trailing space) or "X+" (a typo) does not — even if the data exists on the database.
How is data integrity different from data security?
These terms are related but distinct:
| Concept | Focus | Threat example | Technique |
|---|---|---|---|
| Data security | Preventing unauthorised access | Hacker reads private records | Encryption, access control |
| Data integrity | Ensuring data is correct and unaltered | Bit flip during transmission corrupts a value | Checksums, validation |
| Data availability | Ensuring data can be accessed when needed | Server crash makes records unreachable | Backups, redundancy |
Security, integrity, and availability together form the CIA Triad — the three fundamental goals of information security. GCSE examiners sometimes ask students to explain the difference between them.
What is a checksum and how does it protect integrity?
A checksum is a calculated value derived from a block of data. After data is transmitted or stored, the checksum is recalculated and compared to the original. If they differ, the data has been altered.
Simple example — parity bit:
| Data bits | Count of 1s | Parity bit (even parity) | Full byte |
|---|---|---|---|
1010110 |
4 (even) | 0 |
10101100 |
1110110 |
5 (odd) | 1 |
11101101 |
If a transmission error flips one bit, the parity check fails, and the receiver knows the byte is corrupted and requests a retransmission.
More sophisticated checksums (CRC — Cyclic Redundancy Check) are used in network protocols, file downloads, and storage devices. When you download a file and the website shows an SHA-256 hash for comparison, you are performing a checksum verification.
How does validation protect data integrity at the point of entry?
Validation checks that data conforms to rules before it is accepted. It catches many integrity problems at source:
| Validation type | Rule example | Catches |
|---|---|---|
| Range check | Age must be 0–120 | Values outside expected limits |
| Type check | Score must be an integer | Data of the wrong type |
| Length check | Postcode must be 6–8 characters | Values too short or too long |
| Format check | Email must match x@x.x pattern |
Incorrectly structured data |
| Presence check | Name field must not be blank | Missing mandatory data |
| Look-up check | Country must be in approved list | Values not in a defined set |
Validation cannot guarantee accuracy — it can confirm that an age of 25 is a valid integer in the range 0–120, but it cannot confirm whether 25 is the correct age for that person. That is the role of verification.
What is verification and how does it differ from validation?
Verification checks that data has been entered correctly by comparing it with the original source, rather than checking whether it fits a format:
- Double entry — a user enters data twice; the system accepts it only if both entries match (used for new passwords, important medical data).
- Proofreading — a human reads back the data against an original document (manual verification).
The key distinction:
| Validation | Verification | |
|---|---|---|
| What it checks | Does the data fit the rules? | Is the data the same as the original? |
| Who/what checks | The computer (automated) | A second entry or human check |
| What it cannot catch | Plausible-but-wrong data (e.g. correct age format, wrong age) | Data that is wrong but consistently wrong |
What role do backups play in maintaining integrity?
Backups do not prevent integrity loss — they enable recovery if integrity is lost. A ransomware attack that encrypts all files, a disk failure that corrupts data, or a faulty update that overwrites records can all be recovered from a recent backup.
A sound backup strategy for a GCSE-level answer follows the 3-2-1 rule:
- 3 copies of data
- 2 on different storage media (e.g. hard drive + cloud)
- 1 stored offsite (so a fire or flood cannot destroy all copies)
Regular backups combined with integrity checks on restore (hashes compared before and after) give high confidence that recovered data still has integrity.
Frequently asked questions
Can data be secure but lack integrity?
Yes — this is an important distinction. If an attacker with database access subtly alters a value (for example, changing a bank account balance) without being detected, the data has been breached (security failure) AND the stored value is now wrong (integrity failure). Conversely, data can have integrity but lack security — a file might be perfectly accurate but readable by anyone because it was not encrypted.
Is data integrity only a concern for databases?
No. Data integrity matters for any stored or transmitted data: files downloaded from the internet (checksums verify they were not corrupted in transit), data in RAM (ECC — Error Correcting Code — memory detects and fixes bit flips in servers), data on storage devices (RAID systems detect and correct disk errors), and data in transit over networks (TCP uses checksums on every packet). At GCSE, the most commonly examined contexts are databases and network transmission.
How does hashing relate to data integrity?
Hashing is one of the most important integrity tools. A hash function produces a fixed-length digest from any input; the digest changes completely if even one bit of the input changes (the avalanche effect). Storing the hash of a file alongside the file lets any reader verify the file has not been altered — recompute the hash and compare. This is how software download pages provide SHA-256 checksums for installation files.
What happens if a database has poor data integrity?
Poor integrity can have serious consequences: medical systems with incorrect patient records could lead to wrong treatment; financial systems with corrupted balances could cause incorrect payments; logistics systems with wrong inventory counts could lead to stockouts or over-ordering. In regulated industries, demonstrating data integrity is a legal requirement — healthcare in the UK must comply with data accuracy obligations under the Data Protection Act 2018.
Explore data integrity, security, and every GCSE database topic with Professor Turing at aitutors.me.