Data Integrity: How to Keep Records and Their Connections Reliable
A library's loan record says someone borrowed a book, but its catalog has no record of that book. Data integrity includes preventing broken connections like this—and protecting information from accidental damage or unauthorized changes.
Data integrity concerns whether information stays intact and consistent as it's stored, used, and changed. In security, the National Institute of Standards and Technology (NIST) focuses on preventing improper changes, destruction, or loss.
An approved correction can improve integrity. The aim isn't to freeze every record forever; it's to make legitimate changes without damaging the information people depend on.
Why Do Hashing Algorithms Keep Changing?
Keep the records connected
A database is an organized collection of information managed by software. It may store library members, books, and loans in separate tables, with each table holding rows of related facts.
A loan row can identify a book by its catalog number instead of repeating the book's title and author. That saves repetition, but the number must point to a real entry in the catalog.
Database designers can enforce that relationship with a foreign key, a rule requiring a reference to match an existing record. Keeping these links valid is called referential integrity.
Other rules, called constraints, can reject missing required values or duplicate identifiers. The PostgreSQL database documentation explains how databases enforce these checks when records are added or changed.
For the library, a required, unique member number helps distinguish borrowers with the same name. A rule requiring every loan to identify an existing book prevents a loan from pointing nowhere.
These rules still need careful design. Deleting a book's catalog entry shouldn't casually erase the history of who borrowed it; the database's deletion rules should reflect what the library needs to preserve.
Make a multi-step change hold together
Recording a checkout might require two updates: add the loan and mark that copy of the book as unavailable. If only one update succeeds, the records disagree.
A transaction groups related database changes into an operation that completes as a whole or leaves none of its changes committed. “Committed” means accepted as part of the database's saved state.
PostgreSQL's transaction tutorial describes this all-or-nothing behavior. The application must group the right changes together; a database can't guess that two separately submitted updates were meant to be one job.
That protection addresses incomplete operations. It doesn't establish that the librarian selected the correct book or borrower before starting the transaction.
- Keep every photo and file on a box you own, and reach them from anywhere.
- Let backups run on their own so one dead laptop doesn't take your files with it.
- Add two drives and a failed disk no longer means lost files.
Protect changes and leave a useful trail
Integrity can fail through a software error, damaged storage, a mistaken import, or deliberate tampering. A customer list may still open normally after someone changes its contents improperly.
Give accounts permission to change only the records their work requires. An employee who needs to look up a loan may not need the power to delete the whole catalog.
Audit logs record activity, such as which account changed a record and when. They help trace unexpected edits, but they also need protection against alteration or deletion.
NIST's data-integrity protection guide combines controls such as secure storage, change checks, logs, and backups. A backup is a separate copy kept for recovery; an older usable copy can help after records are damaged.
A valid record can still contain the wrong fact
A book entered with the wrong author can satisfy every database rule. If the system faithfully preserves that entry, protecting the stored data hasn't corrected the original mistake.
Checking facts at entry and protecting later changes therefore work together. Data administration also helps teams agree on definitions and decide who is responsible for corrections.
When restoring damaged records, check their contents and relationships before putting them back into use. For the library, success means borrowers, books, and loans make sense together again—not merely that the database opens.
Data Corruption: When a File Exists but You Can’t Trust It

Hash Functions: Small Outputs With a Big Job

Tampering: An Unauthorized Change Can Still Look Normal

QUOTE:
"Amateurs hack systems, professionals hack people."
