What are the ACID properties of a database transaction?
What they are really testing: Whether you can define each property concretely with an example, not just expand the acronym. Understanding what a transaction actually guarantees is foundational.
A real interview question
What are the ACID properties of a database transaction?
What most people say
drag me
“ACID is atomicity, consistency, isolation, and durability, the properties that make databases reliable.”
It expands the acronym but defines nothing. The interviewer wants each property explained, ideally with the money-transfer example, because that shows you understand what a transaction actually guarantees.
The follow-ups they ask next
Which ACID property do many distributed/NoSQL systems relax, and why?
Often strong consistency and strict isolation, in favor of availability and partition tolerance (eventual consistency). The CAP trade-off pushes some distributed stores away from the strict ACID guarantees of a single-node relational DB.
How does a database actually guarantee durability?
A write-ahead log (WAL): changes are written to a durable log before being applied, so after a crash the log is replayed to recover committed transactions. Replication adds further durability across machines.
What the interviewer is listening for
- Defines all four with an example
- Knows isolation is tunable
- Knows durability uses a WAL / what gets relaxed in distributed DBs
What sinks the answer
- Only expands the acronym
- Cannot give an example
- Confuses consistency with isolation
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“ACID (the money-transfer example): [Atomicity = all-or-nothing, debit and credit both or neither], [Consistency = only valid state transitions, constraints hold], [Isolation = concurrent transactions do not interfere, as if serial, tunable], [Durability = once committed it survives a crash, via a write-ahead log]. These are [what distributed/NoSQL often relax for scale].”
Keep going with databases
Foundation
What is a database index, how does it speed up queries, and what does it cost?
Foundation
What is normalization, and what are primary and foreign keys?
Junior
A query is slow in production. How do you diagnose and fix it?
Junior
Why is database connection pooling important, especially at scale?
Junior
How do read replicas help scale a database, and what is replication lag?
Mid
Under load, your RDS instance is the bottleneck and the app is slowing down. Walk me through your options, in order.
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free