STORAGE, CACHING & SEARCH · SUBTOPIC
ACID Transactions vs. BASE
Understand Atomicity, Consistency, Isolation, Durability versus Basically Available, Soft state, Eventual consistency.
IntermediatePart of Database Design (SQL vs. NoSQL)
Subtopics in Database Design (SQL vs. NoSQL) (2)
In plain words
ACID means a bank transfer either moves the money out AND in together, or cancels both completely. BASE means updating a view count might take a second to catch up everywhere, so the site stays fast.
Think of it like…
Wire transfer (ACID: must balance to the penny) vs. updating YouTube view counts (BASE: close enough right now, exact soon).
Loading interactive diagram
Loading interactive exercise
Theory & how it works
What each letter of ACID guarantees
Atomicity: All-or-nothing. Consistency: Database rules (foreign keys, non-negative balance) remain valid. Isolation: Concurrent transactions don’t corrupt each other. Durability: Once committed to the Write-Ahead Log (WAL), crashes cannot erase it.
Key points & practical guide
Summary checklist
- ACID = strict correctness for payments, inventory, seats
- BASE = high availability and low latency when brief staleness is okay
When to use it
- ACID for money, bookings, auth
- BASE for likes, analytics counters, social feeds
Watch out for
- Assuming "NoSQL" means zero transactions - DynamoDB and MongoDB offer limited single/multi-doc ACID at higher cost
Quick check
Loading quiz