CS FundamentalsHardGATE CS · DBMS
The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values; the checkpoint lists the transactions active at that moment and all dirty pages were flushed when it was taken): <T3 start>, <T3, A>, <T3 commit>, <checkpoint {}>, <T5 start>, <T5, B>, <T4 start>, <T4, C>, <T5 commit>, <T1 start>, <T2 start>, <T2, D>, <T1, E>, <T2 commit>, <T1 commit> Which transactions must be undone and which redone?
- A. Undo {T4}; redo {T1, T2, T5}
- B. Undo {T4}; redo {T1, T2, T3, T5}
- C. Undo {T1, T2, T5}; redo {T4}
- D. Undo {T3, T4}; redo {T1, T2, T5}
Correct answer: A. Undo {T4}; redo {T1, T2, T5}
Transactions that committed before the checkpoint (T3) are already on disk and need nothing. Those that committed after it (T1, T2, T5) are redone, whether they started before or after it. Those with no commit record (T4) are undone, including any that were active at the checkpoint.
More DBMS and SQL questions
- Classify the schedule R3(A), W2(A), W3(B), R2(B), W3(A), W1(A), R1(B), W1(B).
- A multilevel index is built over a first level of 40,000 index entries; every index block holds 34 entries (fan-out 34), and levels are…
- Why does a B+ tree usually have a smaller height than a B-tree built on the same key with the same block size?
- A multilevel index is built over a first level of 1,000,000 index entries; every index block holds 100 entries (fan-out 100), and levels…
- Table Acct(no, branch, bal) rows: (101, 'Agra', 500), (102, 'Agra', 1500), (103, 'Bhopal', 700), (104, 'Bhopal', 700), (105, 'Cuttack'…
- R(A, B) = {(1, 4), (3, 4), (4, 1), (4, 3), (4, 4)} and S(B, C) = {(2, 5), (2, 7), (3, 5), (4, 6)}. How many tuples are in R ⟕ S (left…