Databases & Data Storage

Data Consistency

Definition

Consistency in database systems refers to the requirement that any given database transaction must change affected data only in allowed ways. Data written to a database must be valid according to all defined rules, including constraints, cascades, and triggers.

Why It Matters

Data consistency is crucial for data integrity. It ensures that the data in the database is always in a valid, logical state.

Contextual Example

If a database has a rule that a bank account balance cannot be negative, the consistency guarantee ensures that no transaction can ever result in a negative balance.

Common Misunderstandings

  • This "Consistency" is the "C" in ACID. It is different from the "Consistency" in the CAP theorem.
  • In the CAP theorem, "Consistency" means that all clients see the same data at the same time.

Related Terms

Last Updated: December 17, 2025