Articles

ACID vs BASE: Two Approaches to Database Consistency

ACID guarantees strict consistency after every transaction; BASE trades that for availability and scale. How each model works and when to pick one.

Chisato Chisato · · 4 min read
Rows of server hardware in a data center

ACID and BASE are two competing philosophies for how a database should behave under concurrent writes and failures. ACID prioritizes strict, immediate consistency — a transaction either fully happens or doesn’t happen at all, and every reader sees the same correct state. BASE relaxes that guarantee in exchange for availability and horizontal scale, accepting that different nodes might briefly disagree before settling on the same answer.

What ACID guarantees

ACID is an acronym for the four properties a transactional database promises:

  • Atomicity — a transaction’s operations all succeed or all roll back together. A transfer that debits one account and credits another never leaves the debit applied without the credit.
  • Consistency — a transaction moves the database from one valid state to another, respecting every constraint, trigger, and rule defined on the schema.
  • Isolation — concurrent transactions don’t see each other’s uncommitted intermediate state. How strictly this holds depends on the isolation level; see optimistic vs pessimistic locking for how databases enforce it under contention.
  • Durability — once a transaction commits, it survives a crash. This is typically implemented with a write-ahead log that persists changes before acknowledging the commit.

Traditional relational databases — Postgres, MySQL, SQL Server — are built around ACID by default, which is why they remain the standard choice for anything involving money, inventory, or other data where a half-applied transaction is unacceptable.

What BASE trades for scale

BASE stands for Basically Available, Soft state, Eventually consistent — and it’s less a strict acronym than a description of the tradeoffs many distributed NoSQL systems make deliberately:

  • Basically available — the system prioritizes responding to every request, even during a partial failure, over refusing to answer until it can guarantee correctness.
  • Soft state — the system’s state can change over time even without new input, as replicas converge toward agreement in the background.
  • Eventually consistent — given enough time without new writes, all replicas will converge to the same value, but at any given moment different nodes might return different answers for the same key.

Systems like DynamoDB, Cassandra, and many document stores lean BASE, particularly in multi-region deployments where waiting for every replica to agree before responding would mean unacceptable latency, or an outage in one region blocking writes everywhere.

Comparing the two models

ACIDBASE
ConsistencyStrong — every read sees the latest writeEventual — replicas converge over time
Availability under partitionCan refuse writes to preserve consistencyStays available, may serve stale data
Typical systemsPostgreSQL, MySQL, SQL ServerDynamoDB, Cassandra, many document stores
Best forFinancial transactions, inventory, anything requiring correctnessHigh-scale reads, multi-region apps, tolerant of brief staleness
Scaling modelVertical, or careful shardingHorizontal, designed for distribution from the start

Why this connects to the CAP theorem

The ACID/BASE split is a practical expression of the CAP theorem: during a network partition, a distributed system must choose between staying consistent (rejecting requests it can’t guarantee are correct) or staying available (answering anyway, possibly with stale data). ACID systems tend to fall on the consistency side of that tradeoff; BASE systems deliberately choose availability, betting that brief inconsistency is a better user experience than an outage.

This isn’t an all-or-nothing choice, either. Many systems that call themselves eventually consistent still offer stronger guarantees on request — read-your-own-writes consistency, or the option to read from a primary instead of a read replica when correctness matters more than latency for a specific query.

Choosing between them

The decision usually comes down to what a stale read costs you. If a customer briefly sees an outdated inventory count and the checkout process double-checks stock before finalizing, eventual consistency is a fine tradeoff for lower latency and higher availability. If a stale read means a bank balance shows funds that were already spent, ACID’s stronger guarantees are worth the cost in scale and latency. Many production systems mix both: an ACID relational database as the system of record for critical transactions, with a BASE-style cache or search index — built via change data capture from that source of truth — handling the high-volume reads that can tolerate a few seconds of staleness.

The takeaway

ACID guarantees that every committed transaction is immediately, uniformly correct everywhere it’s read — at the cost of availability and scale during network partitions. BASE accepts temporary disagreement between replicas in exchange for staying available and scaling horizontally. Neither model is universally right: pick ACID when correctness can’t wait, and BASE when availability and scale matter more than a perfectly up-to-date answer on every single read.

The Lycoris Team The Lycoris Team · · 4 min read

What Is MVCC? Multi-Version Concurrency Control

MVCC lets readers and writers work on a database concurrently without blocking each other, by keeping multiple versions of each row instead of locking it.

#Databases #Computer Science #Backend
Chisato Chisato · · 4 min read

Byzantine Fault Tolerance Explained

Byzantine fault tolerance lets a distributed system keep working correctly even when some nodes fail arbitrarily or actively lie, not just crash cleanly.

#Distributed Systems #Computer Science #Databases
Chisato Chisato · · 5 min read

Raft vs Paxos: Consensus Algorithms Compared

Raft and Paxos both let a distributed cluster agree on a value despite failures — Raft trades some flexibility for a design built to be understood.

#Distributed Systems #Computer Science #Databases