DEV Community

Wakeup Flower
Wakeup Flower

Posted on

Atomicity Consistency Isolation Durability = ACID

1️⃣ ACID

ACID is a set of properties that ensure database transactions are reliable. Each letter stands for:

Letter Meaning What it ensures
A Atomicity A transaction is all or nothing. If one step fails, the entire transaction is rolled back.
C Consistency The database moves from one valid state to another valid state. Data integrity rules are never violated.
I Isolation Concurrent transactions don’t interfere with each other. The end result is the same as if transactions ran sequentially.
D Durability Once a transaction is committed, it cannot be lost, even if there’s a crash.

✅ Example: Transferring \$100 from Alice → Bob

  • Atomicity: Both debit and credit happen, or neither happens.
  • Consistency: Total money in the system remains the same.
  • Isolation: Two transfers happening at the same time don’t mix up balances.
  • Durability: Even if the DB crashes immediately after, the transfer persists.

So ACID properties are essential for financial data, as in your scenario.

Top comments (0)