ACID Properties & Atomicity
Subject: Database Management Systems
Fundamental transaction processing guarantees in relational DBMS.
Concept Summary
ACID guarantees form the bedrock of transactional database systems. Atomicity ensures that if an error occurs midway through a transaction (e.g. money deducted from Account A but system crashes before crediting Account B), the database engine automatically rolls back all changes so no partial updates remain.
Key Revision Rules & Formulas
- Atomicity: 'All-or-Nothing' execution guarantee for all database operations in a transaction.
- Consistency: Database transitions from one valid state to another, preserving integrity constraints.
- Isolation: Concurrent transactions execute independently without interfering with each other.
- Durability: Committed transaction modifications persist permanently even after system crashes.
Common Exam Pitfalls
- Confusing Atomicity with Durability: Atomicity handles all-or-nothing completion; Durability ensures committed data survives power failure.
- Believing Isolation means no locking: Isolation levels (Read Committed, Repeatable Read, Serializable) determine lock granularity and concurrency anomalies.
Sample Practice Questions
Question 1: Which ACID property guarantees that either all operations of a database transaction are executed or none of them are?
- Atomicity
- Consistency
- Isolation
- Durability
Explanation: Atomicity enforces the 'all-or-nothing' principle, ensuring partial transaction execution is never persisted.