ITPEC FE Morning April 2019 Question 29
Which of the following is a characteristic to guarantee that the result of an update transaction is either performed completely or canceled as if nothing happened?
Explanation
Atomicity — the A in ACID: the updates of a transaction are either all applied or none are.
If a transaction fails partway, for example after debiting one account but before crediting the other, the DBMS rolls back the changes already made, so the database looks as if the transaction never ran. Only when every step succeeds is the transaction committed.
The other three ACID properties guard different things:
- •Consistency: a transaction takes the database from one valid state to another, satisfying every constraint
- •Isolation: concurrent transactions do not see each other's intermediate results
- •Durability: once committed, the results survive a failure
Answer (a)
Why not others:
- •(b) Consistency — concerns whether the result obeys the integrity constraints, not whether the update is all or nothing
- •(c) Durability — concerns keeping committed results after a crash; it says nothing about a half-finished update
- •(d) Isolation — concerns interference between transactions running at the same time
Key rule: All or nothing is atomicity, valid states are consistency, no interference is isolation, and surviving failures is durability.
Databases · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.