ACID
Definition
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps.
Why It Matters
ACID compliance is the gold standard for transactional databases. It ensures that your data remains consistent and reliable, which is absolutely critical for applications like banking, e-commerce, and any system that handles financial or other important transactions.
Contextual Example
When you transfer money from one bank account to another, the operation is a transaction. ACID guarantees that the money is either successfully withdrawn from one account AND deposited in the other (Durability, Atomicity), or the whole transaction fails and no change is made. It cannot be partially completed.
Common Misunderstandings
- Atomicity: All operations in a transaction succeed, or none do. Consistency: The database remains in a valid state. Isolation: Concurrent transactions do not interfere with each other. Durability: Once a transaction is committed, it will remain so, even in the event of a power loss.
- Traditional relational databases are strongly ACID-compliant. Many NoSQL databases relax some of these guarantees in favor of performance and availability.