Which ACID property ensures that a transaction is executed entirely or not…
2024
Which ACID property ensures that a transaction is executed entirely or not executed at all, so that partial updates are not permanently applied if a failure occurs during execution?
- A.
Consistency
- B.
Isolation
- C.
Recoverability
- D.
Atomicity
- E.
Durability
Attempted by 68 students.
Show answer & explanation
Correct answer: D
Correct answer: Atomicity.
Atomicity is the ACID property that guarantees a transaction is treated as a single, indivisible unit of work — it is either executed entirely (all of its operations commit) or not executed at all. It is popularly called the “all-or-nothing” rule.
If a failure (system crash, power loss, error, or explicit abort) occurs midway through a transaction, the recovery mechanism rolls back every change the transaction has already made, so no partial updates are left permanently in the database. The classic example is a fund transfer: debiting account A and crediting account B must both succeed; if the credit fails after the debit, atomicity ensures the debit is undone so money is never lost.
The other ACID properties solve different problems: Consistency keeps the database in a valid state with respect to all rules and constraints, Isolation keeps concurrently running transactions from interfering with one another, and Durability guarantees that once a transaction commits, its effects survive subsequent failures. (Recoverability is a schedule property, not one of the four ACID properties.) Hence the property described here is Atomicity.