TransactionsBeginner

Explain ACID

“What do the four letters mean, and which mechanism provides each?”

What this tests

  • Understanding each guarantee separately

Answers by level

Read the beginner answer first and notice what is missing.

Atomicity: all of a transaction or none — provided by the log and the ability to declare a transaction aborted. Consistency: declared constraints hold at commit. Isolation: concurrent transactions do not see each other’s uncommitted work — how much of committed work they see is the isolation level. Durability: once COMMIT returns, the change survives a crash — provided by fsync of the write-ahead log.

They are four separate guarantees with separate mechanisms; ask which letter someone means.

Green flags · Red flags

Strong green flag · Distinguishes database consistency from business invariants.
Green flags
  • Separates the four
  • Names the WAL for durability
  • Knows C is about declared constraints
Red flags
  • Vague "reliable"
  • Conflates atomicity and durability

Follow-up questions

F1
A crash happens right after COMMIT returns but before table pages are written. Is the data safe?

Scenario

A transfer debits one account and the process dies before crediting the other. Which ACID property prevents the money vanishing, and how?

Learn this topic