What is ACID compliance in a database?
Short answer: ACID stands for: Atomicity: Ensures that all operations in a transaction are completed successfully, or none are.
Explain a bit more
If one part of a transaction fails, the whole transaction fails. Consistency: Guarantees that the database is always in a valid state, adhering to all rules, including constraints, after a transaction. Isolation: Ensures that transactions are executed in isolation from each other, so one transaction does not interfere with another. Durability: Ensures that once a transaction is committed, it is permanent, even in the case of system failures.
Real-world example (ShopNest)
Checkout wraps stock decrement + order insert in a transaction so you never sell stock you do not have.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png