ACID vs BASE: Consistency Models in Databases
Fast recall
Quick revision
Core answer
Whether you grasp the fundamental distributed systems trade-off between consistency and availability, which underpins database architecture decisions.
Treating ACID and eventual consistency as mutually exclusive database labels, or promising a fixed convergence delay without a product guarantee.
Compare exact transaction, read, write, conflict, and partition guarantees for an operation instead of assigning one rule to a database family.
Interview-ready guide
Interview answer
ACID names transaction properties: Atomicity, Consistency, Isolation, and Durability. It does not by itself say that every connection or replica instantly reads the latest commit. BASE is an informal description—Basically Available, Soft state, Eventually consistent—for designs that may allow replicas to diverge temporarily and converge later. It is not a formal opposite of ACID.
For example, a transfer needs an atomic transaction around the debit and credit and an isolation strategy that protects the balance invariant. A displayed view count may accept a stale replica and reconcile it later. Under a network partition, CAP requires a distributed operation to give up either a linearizable result or availability on some side; it does not classify every relational database as consistent and every NoSQL database as available. I would name the exact database operation, transaction scope, isolation, read consistency, replication, and failure behavior instead of choosing from the labels alone.
ACID vs BASE: Consistency Models in Databases
Direct Answer
ACID describes transaction properties; it does not by itself mean that every read always sees the latest write. BASE is an informal description of systems that may stay available with temporary inconsistency and converge later. Relational and NoSQL products can offer several isolation and consistency choices, so compare the guarantee of the actual operation, especially during a network partition.
Code Example
-- Atomic transaction: both account updates commit or neither does.
START TRANSACTION;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;
Whether another transaction sees old or new values, and whether a replica lags, depends on its isolation and replication path. A BASE-style system is not represented by generic SQL syntax; its write and convergence rules must come from the selected database.
Common Mistakes & Pitfalls
- Calling ACID strong consistency: ACID transaction properties and distributed read consistency answer different questions.
- Assuming eventual consistency is bounded: convergence has no universal millisecond range or maximum delay unless the system explicitly supplies one.
- Mapping SQL to ACID and NoSQL to BASE: modern products expose mixed and tunable guarantees.
- Treating BASE as always available: overload, quorum loss, validation, and other failures can still reject requests.
- Ignoring the operation: state the transaction scope, isolation, replication, and partition behavior being relied upon.
Check your understanding
Answer these without looking back at the article.
- What is the CAP theorem?
Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.