Graph
Consistency (ACID)

✅Consistency (ACID)

NEW

Also known as: Transactional Consistency

The ACID property requiring any transaction to move the database from one valid state to another, preserving constraints.

DESCRIPTION

In ACID, Consistency ensures that database rules and constraints hold before and after a transaction. If a transaction violates constraints, it must roll back. Consistency works alongside Atomicity, Isolation, and Durability to provide reliable transactions. It is enforced by constraints, triggers, and application logic. In distributed systems, strong consistency may trade off with availability and latency. BASE and eventual consistency relax guarantees to improve scalability. Choosing consistency models depends on workload, tolerance for stale reads, and correctness requirements. Understanding consistency is crucial for schema design and transaction boundaries.

ALTERNATIVE DEFINITIONS

Wikipedia

Consistency ensures that any transaction will bring the database from one valid state to another, maintaining database invariants.

Explicitly ties consistency to invariants and valid states in ACID.

Source

Microsoft Learn

The consistency property ensures that a transaction can only bring the database from one valid state to another by enforcing all rules.

Connects consistency to enforcement of rules in a relational database context.

Source

ACID Atomicity Isolation Durability Constraints Transaction Serializability

COMPETING TERMS

BASE Eventual Consistency

RELATIONS

KNOWLEDGE AREAS

Data Storage & Operations Data Architecture Data Engineering

TARGET AUDIENCE

Software Developer Data Engineer Data Architect Cloud Architect

EXTERNAL SOURCES

TOP QUESTIONS

What does Consistency (ACID) guarantee?

It guarantees that all database invariants and constraints hold after a committed transaction, ensuring progress from one valid state to another.

Category: Definition

How is Consistency enforced in practice?

Through constraints, triggers, cascades, and application checks. Transactions violating constraints are rolled back automatically.

Category: Mechanism

Is Consistency the same as Isolation?

No. Isolation controls concurrent visibility; consistency ensures invariants. Both contribute to correct transactional behavior.

Category: Misunderstanding

How does Consistency relate to BASE systems?

BASE trades strict consistency for availability and partition tolerance, often providing eventual consistency rather than immediate invariants across replicas.

Category: Comparison

What is a common mistake regarding Consistency?

Relying solely on application code without defining database constraints, leading to drift and data corruption.

Category: Mistakes

When is strong Consistency essential?

For financial transactions, inventory counts, and referential integrity where invariant violations cause material harm.

Category: Requirements

What is a hot topic around Consistency?

Tunable consistency in distributed databases and consensus protocols balancing correctness and latency.

Category: Topic

How do isolation levels affect perceived Consistency?

Weaker isolation can expose anomalies, but consistency constraints still apply at commit. Choose isolation based on anomaly tolerance.

Category: Concepts

How to validate Consistency in systems design?

Define invariants explicitly, enforce with constraints, and test with property-based or Jepsen-like fault injection.

Category: Best practices