What Is ACID?
ACID Database Properties
ACID stands for Atomicity, Consistency, Isolation, and Durability — four properties that guarantee database transactions are processed reliably. When you transfer money between accounts, ACID ensures both the debit and credit happen together or not at all.
How ACID Works
Without ACID: transferring $100 between accounts could debit Account A but crash before crediting Account B — money disappears. With ACID: the entire transaction succeeds or rolls back completely. No partial state, no lost money.
Key Concepts
- Atomicity — All operations in a transaction succeed or all fail — no partial updates
- Consistency — The database moves from one valid state to another — constraints are always enforced
- Isolation — Concurrent transactions don't interfere with each other — each sees a consistent snapshot
- Durability — Once committed, data survives crashes — written to disk, not just memory
Frequently Asked Questions
Do NoSQL databases support ACID?
Some do. MongoDB supports multi-document ACID transactions. DynamoDB has transaction support. But most NoSQL databases trade ACID for performance and availability (see CAP theorem).