Back to roadmap
Module 6 · Relational Data at ScaleDay 04925 min

Relational Basics and ACID

Why SQL still wins for most transactional work.

Day 049

Relational Basics and ACID

Atomic
note
Consistent
note
Isolated
note
Durable
note
Memory hook

Relational Basics and ACID: why sql still wins for most transactional work

Mental model

shape data so reads and writes stay honest

Design lens

Higher isolation costs locks/aborts.

Recall anchors
AtomicConsistentIsolated

Why it matters

Relational databases provide ACID transactions: atomic all-or-nothing changes, consistent (invariant-preserving) writes, isolated concurrency, and durable on commit. They're the right default for any transactional workload.

Deep dive

Atomicity: a transaction either fully applies or doesn't.

Isolation levels: read-uncommitted (rare), read-committed (default in many), repeatable-read, serializable.

Most non-trivial concurrency bugs come from picking too weak an isolation level.

Demo / scenario

Transfer money between accounts.

  1. BEGIN; UPDATE A -100; UPDATE B +100; COMMIT;
  2. Atomicity ensures both or neither.
  3. Repeatable-read prevents non-repeatable reads of A.
  4. Serializable prevents anomalies even under concurrent transfers.

Tradeoffs

  • Higher isolation costs locks/aborts.
  • Most apps default to read-committed; raise where needed.
  • Optimistic concurrency control is an alternative.

Diagram

Atomic
Consistent
Isolated
Durable
ACID and isolation.

Mind map

Check yourself

Loading quiz…

Sources & further reading