Skip to main content
Data Quality Fundamentals

Data Integrity: Keeping Relationships Between Your Data Correct

Data integrity ensures relationships between data points remain consistent and correct. When integrity breaks, related records point to nothing — or the wrong thing.

You pulled a list of all orders for the last quarter. One hundred and twelve orders have no associated customer. The customers were deleted from the database, but the orders remain — orphaned, pointing to records that no longer exist. That's data integrity failure.

Data integrity is about the correctness and consistency of relationships between data points. In a relational database, it means foreign keys point to existing records, parent-child relationships are valid, and linked data tells a coherent story. In flat files and spreadsheets, it means reference fields (like customer IDs, product codes, or category names) are correct and consistent with the entities they reference.

Data Integrity vs. Data Quality

Data integrity is both a database concept and a data quality dimension. In database terms, referential integrity is enforced by the database engine (you can't delete a customer if orders reference them). In data quality terms, integrity is often violated when:

Sohovi measures all 10 data quality dimensions — completeness, validity, uniqueness, accuracy, consistency, and more — automatically across every column.

  • Data is exported and then modified in ways that break relationships
  • Records are deleted from one system but not the other in an integration
  • Manual edits change reference IDs without updating linked records
  • Imports introduce new records with IDs that don't match existing reference data

Types of Integrity Failures

Referential integrity — A record references a parent record that doesn't exist (orphaned order, line item with no invoice).

Domain integrity — A value falls outside the valid domain for that field (a product assigned to a category that doesn't exist in your category list).

Entity integrity — A record exists without a primary key, or two records share the same key.

Business rule integrity — Data violates a business constraint that the database doesn't enforce (e.g., a subscription with an end date before its start date).

Why Integrity Failures Are Dangerous

Unlike completeness failures (which are visible as empty fields), integrity failures are often hidden. An order that points to a deleted customer looks complete. A transaction linked to the wrong account looks valid. The failure only becomes apparent when you try to join the data — and by then, you've already built analysis on a broken foundation.

Sohovi profiles every column in your dataset for completeness and flags the exact rows where values are missing — free to try.

Finding and Fixing Integrity Issues

Profile your reference fields: if your orders table has a "customer_id" column, check that every value in that column matches a value in your customers table. Any ID that doesn't match is an integrity failure.

For spreadsheet-based data, Sohovi can profile reference columns for consistency and flag values that appear only once or in unexpected patterns — a signal that the reference data may be broken.

Fix the cause: either restore the referenced records, update the reference to point to the correct record, or explicitly null the reference and treat it as an unlinked record.

Selva Santosh

Data quality, for people who ship

Selva writes practical guides on data quality, profiling, and governance to help teams ship better data.

Start for free

Stop guessing. Start knowing your data quality.

Sohovi profiles your datasets in minutes — surfacing completeness gaps, type mismatches, and duplicate patterns before they reach production.

No credit card required · Free forever plan