ITPEC FE Morning April 2020 Question 30
In a database system, which of the following is the action to undo changes done by transactions executed after the last commit?
Explanation
Roll back — undoing the changes made since the last commit, returning the database to that committed state.
The DBMS records the before images of changed data in its log. When a transaction fails or is cancelled before it commits, rollback writes those before images back, so none of its uncommitted changes stay in the database.
Answer (b)
Why not others:
- •(a) Commit — the opposite: it makes a transaction's changes permanent and ends it
- •(c) Roll forward — redoes committed changes from the after images in the log, for example after a backup is restored; it reapplies work instead of undoing it
- •(d) View — a virtual table defined by a query; it has nothing to do with transaction control
Key rule: Rollback uses before images to undo uncommitted work; roll forward uses after images to redo committed work.
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.