Skip to content
RED SAGSkills
easyDatabase Administrator interview question

Explain the ACID properties of a database transaction with a simple example.

What the interviewer wants to hear

  • Atomicity: all steps succeed or none do
  • Consistency: constraints and rules always hold
  • Isolation: concurrent transactions do not interfere in unsafe ways
  • Durability: committed data survives crashes, via write-ahead log
  • Bank transfer example

Model answer

Think of moving 1,000 rupees from account A to account B. Atomicity means both the debit and the credit happen, or neither does; if anything fails, the transaction rolls back. Consistency means the database moves from one valid state to another, so constraints like "balance cannot be negative" or foreign keys are never broken. Isolation means another transaction running at the same time does not see a half-finished transfer; how strict this is depends on the isolation level. Durability means once COMMIT returns, the transfer is saved even if the server loses power a second later. Databases achieve durability by writing changes to a write-ahead log and flushing it to disk before confirming the commit.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Database Administrator questions