AI-Ready Data Ho Bae

Data Consistency vs Data Integrity: What’s the Difference?

Two overlapping translucent circles with the shared area highlighted, standing for data integrity and data consistency

Picture a forecasting team that merges order histories from two regions, one recording quantity in cases and the other in units. Both columns are named qty, and every row passes the database checks.

Data consistency vs data integrity comes down to two questions: data integrity is whether data stays intact, valid against its defined rules and unaltered by unauthorized or accidental change, while data consistency is whether the same fact is recorded the same way across tables, systems and time.

CUBIG’s Syntitan reports integrity and consistency as two separate angles in Ready for Raw Data, and a dataset can pass one and fail the other.

Key takeaways

  • Data integrity asks whether data stays intact, valid against its defined rules and unaltered by unauthorized or accidental change.
  • Data consistency asks whether the same fact is recorded the same way across tables, systems and time.
  • A dataset can pass every integrity check and still mix units, codes or definitions between sources.
  • Data that is intact and consistent still has to be checked against the specific AI task it will serve.

What is data integrity?

Data integrity describes whether data stays intact and has not been changed, destroyed or lost without authorization. The NIST CSRC glossary, citing NIST SP 800-57 Part 1 Rev. 5 and other publications, defines data integrity as “A property whereby data has not been altered in an unauthorized manner since it was created, transmitted, or stored.”

The same NIST glossary lists a second definition from CNSSI 4009-2022: “The property that data has not been changed, destroyed, or lost in an unauthorized or accidental manner.” Both definitions describe the condition of the data itself and whether an unauthorized or accidental change has affected it.

A database enforces part of data integrity through rules on what users can store. The PostgreSQL documentation on constraints states: “If a user attempts to store data in a column that would violate a constraint, an error is raised.” PostgreSQL supports check, not-null, unique, primary key, foreign key and exclusion constraints.

Typical data integrity failures include:

  • Missing values: a required field is empty even though a downstream process depends on it.
  • Invalid entries: a value breaks its defined rule, such as a negative quantity where only positive quantities are allowed.
  • Duplicates: the same record appears twice in a table that should hold unique records.
  • Broken references: an order points to a customer or product that does not exist in the referenced table.
  • Unauthorized or accidental changes: someone or some process modifies, deletes or loses a value without an approved reason.

A database constraint enforces one specific rule. The data team still decides which rules each field needs, and a constraint cannot confirm that the business assumption behind a value is correct.

What is data consistency?

Data consistency describes whether related data agrees within a defined context. The ISO/IEC 25012 data quality model, as summarized on ISO25000.com, has 15 characteristics and treats consistency as the degree to which data has attributes that are “free from contradiction and are coherent with other data” in a specific context of use.

Data consistency looks at relationships between values, records and representations. A value can be valid on its own and still contradict another record of the same fact. The database accepts both values because neither one breaks a constraint.

Common data consistency failures include:

  • Different units: one source records quantity in cases, another in individual units.
  • Different code lists: the sales system codes a closed deal as WON, the finance system codes the same status as 4.
  • Different date formats: one export writes day-month and another month-day, so the same string can mean two dates.
  • Different field names: two tables use different names for the same business concept, or the same name for different ones.
  • Different definitions: one team counts an active customer by recent purchases, another by account status.

A difference in representation is not always a contradiction. A documented conversion rule or code mapping can explain it. The data team checks whether each representation keeps the same intended meaning once the mapping is applied.

Database terminology adds a second meaning. In ACID database transactions, the C stands for consistency: a transaction must leave the database with its defined rules still satisfied. That meaning covers the rules inside one database, not whether the same business fact agrees across several systems.

What is the difference between data consistency and data integrity?

Data consistency vs data integrity is easiest to separate by the question each one asks, the scope it covers and the checks a team runs for it.

Data consistency vs data integrity
AspectData integrityData consistency
Question it asksHas the data stayed intact and does it satisfy its defined rules?Does the data agree with other records and definitions of the same fact?
ScopeValues, records, references and changes inside a dataset.Relationships across tables, systems, datasets and time.
Typical failuresMissing values, invalid entries, duplicates, broken references, unauthorized or accidental changes.Conflicting units, code lists, date formats, field names and business definitions.
Typical checksNot-null, unique, primary key, foreign key and range checks.Cross-source comparisons, unit conversion, code mapping and definition reviews.
What passing does not proveThat related records or systems agree on what a value means.That values are accurate, complete or protected from unauthorized change.

Accuracy and completeness need their own checks. The ISO/IEC 25012 model summarized on ISO25000.com lists both as characteristics separate from consistency, so a dataset can be consistent everywhere and still hold wrong or missing records.

One merged qty column checked three ways: the integrity check passes, the consistency check fails because cases and units are mixed, and accuracy is a separate question

Can data pass integrity checks and still be inconsistent?

Data can pass every integrity check and still be inconsistent. Take an illustrative example: a forecasting team merges order histories from two regions. One region records quantity in cases and the other in individual units, and both source columns are named qty.

Every merged row passes type, not-null and foreign key checks, so the database accepts it. The merged qty column still mixes two units. The same number means cases in one region and single units in the other, so the forecasting team cannot compare the two regions’ order volumes directly.

The reverse case also happens. A source system copies the same wrong value into every connected system. Every system agrees, so the data is consistent, but the shared value is not accurate. Consistency checks cannot tell whether a shared value matches reality.

Both examples show why data consistency and data integrity need separate checks. A team that checks only database rules misses contradictions between sources, and a team that checks only agreement between sources can copy the same error everywhere.

How do you check data consistency and data integrity before an AI task?

An AI team runs both sets of checks on the dataset prepared for one specific task. The checklist below gives data engineers and ML engineers a starting point:

  • Define the task and its data needs. The ML team names the prediction or classification task and lists the required fields, units, definitions and expected relationships.
  • Check required values and valid entries. The data engineer reviews missing values, data types, allowed ranges and invalid categories, and investigates exceptions before deleting them.
  • Check uniqueness and references. The data engineer looks for unexpected duplicates and confirms that primary and foreign keys point to the records the task needs.
  • Compare representations across sources. The data team compares shared fields across tables for units, date formats, codes and category mappings, and writes down each conversion.
  • Align business definitions and time references. The analytics lead confirms that fields such as customer status, order completion and revenue mean the same thing in every source, for the same period.
  • Record the results with the data version. The data team stores the checks, conversions and open issues with the dataset version, so the ML team can rerun them when the source or the task changes.

A passed checklist does not mean every issue is gone. The data team keeps the exceptions and the assumptions behind each decision, so a reviewer can later check whether the prepared data still meets the task.

Is intact, consistent data ready for an AI task?

Intact, consistent data is not automatically ready for an AI task. A dataset can pass both checks and still lack the context, usability or examples a specific model task needs.

CUBIG defines AI-ready data as data prepared for a specific AI task, with results checked, that a team can check again when conditions change. The task decides which other preparation and checks the team needs; the article AI-ready data vs clean data covers that gap in more detail.

CUBIG Shorts

Clean, Consistent, and Dead on Arrival

A short clip from episode 5 of CUBIG’s series It Worked in the Demo.

▶  Watch on YouTubeSubscribe

Comparison of integrity and consistency checks, owned by the data team, with checking whether data is AI-ready for one task, owned by the AI team with the data owner

Where does CUBIG fit?

Syntitan is CUBIG’s AI-ready data platform. Syntitan keeps the original Dataset intact, starts each Use Case Project from a copy and records preparation and verification results as Versions. Syntitan’s Ready for Raw Data reports integrity and consistency as separate angles, next to usability, context, reproducibility and traceability, so a team can see which kind of problem a dataset has before it prepares the data for a task.

Syntitan does not replace database constraints, does not fix source systems and does not certify data or guarantee model results. A higher Data Readiness score does not by itself mean a better model result. Related entries: data consistency, data integrity and data validation.

Pick one table your AI task reads and check one shared field against its other source. Try it on your data with Syntitan.

Explore Syntitan, CUBIG's AI-Ready Data Platform

FAQ

What is the difference between data consistency and data integrity?

Data integrity asks whether data stays intact, valid against its defined rules and unaltered by unauthorized or accidental change. Data consistency asks whether the same fact is recorded the same way across tables, systems and time.

Can data have integrity but not consistency?

Yes. Two regions can record quantity in cases and in units under the same column name. Every row passes type, not-null and foreign key checks, but the merged column mixes two units.

Is consistent data always accurate?

No. A wrong value copied the same way into every system is consistent but not accurate. ISO/IEC 25012 treats accuracy, completeness and consistency as separate characteristics.

What does consistency mean in ACID?

In database transactions, consistency means a transaction leaves the database with its defined rules still satisfied. That meaning covers one database, not whether several systems record the same business fact the same way.