AccentureDatabaseMedium

Explain ACID properties with a practical transaction example

ACIDTransactionsDatabaseConsistency

Question

What are ACID properties in databases? Explain each property using a money transfer example.

Interview Answer

ACID ensures reliable transactions: either all operations succeed or none do, constraints remain valid, concurrent transactions do not corrupt each other, and committed changes survive crashes. This is why ACID databases are preferred for banking, payments, and order workflows.

Explanation

Use concrete transaction flows (like bank transfer) to explain ACID. Show what can go wrong without each property: partial writes, inconsistent constraints, dirty reads, and lost commits.

Key Points

  • Atomicity prevents partial updates
  • Consistency enforces rules/constraints at commit
  • Isolation manages concurrent transaction interactions
  • Durability persists committed changes through failures

Common Mistakes

  • Defining ACID without a real transactional example
  • Confusing isolation with data consistency constraints
  • Ignoring isolation levels and their trade-offs

Likely Follow-Up Questions

  • What are common isolation levels and anomalies?
  • How do distributed transactions differ from local ACID?
  • When is eventual consistency acceptable?

Interview Timing

Target speaking time: about 4 minutes.

Related Questions