ITPEC FE Morning October 2023 Question 29
Which of the following is a file in which values before and after an update of the database are written and saved as the update history of the database?
Explanation
Log file — the journal where the DBMS writes the before and after image of every update.
For each update the DBMS records the value before the change (before image) and the value after it (after image). The before images let it undo, roll back, an incomplete transaction; the after images let it redo, roll forward, committed work onto a restored backup after a media failure.
Answer (d)
Why not others:
- •(a) Backup file — a copy of the whole database at one moment, not a history of individual updates
- •(b) Checkpoint file — marks the points where buffers were written to disk, so recovery knows where to start; it holds no before and after values
- •(c) Dump file — an export of the database contents at one moment, another kind of snapshot
Key rule: Backups hold a snapshot; the log holds the changes since, and recovery needs both: restore the backup, then roll forward with after images or roll back with before images.
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.