CS FundamentalsHardGATE CS · Product placement
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): <T1 start>, <T1, A>, <T2 start>, <T2, B>, <T2 commit>, <checkpoint {T1}>, <T5 start>, <T1, C>, <T3 start>, <T5, D>, <T4 start>, <T4, E>, <T3, F>, <T1 commit>, <T3 commit> Which transactions must be undone and which redone?
- A. Undo {T4}; redo {T1, T3}
- B. Undo {T4, T5}; redo {T1, T2, T3}
- C. Undo {T4, T5}; redo {T1, T3}
- D. Undo {T1, T3}; redo {T4, T5}
Correct answer: C. Undo {T4, T5}; redo {T1, T3}
Transactions that committed before the checkpoint (T2) are already on disk and need nothing. Those that committed after it (T1, T3) are redone, whether they started before or after it. Those with no commit record (T4, T5) are undone, including any that were active at the checkpoint.
More DBMS and SQL questions
- R(A, B, C, D, E) has functional dependencies A → DE, C → AD, AD → C, E → AC. Which of the following is the complete set of candidate keys…
- Keys 4, 38, 33, 56, 40, 14, 54 are inserted in this order into an empty B+ tree where a node holds at most 2 keys; an overflowing leaf…
- Σ = {AE → D, BC → D, C → A, A → E, D → B} on R(A, B, C, D, E). Exactly one FD in Σ is redundant (it can be derived from the others). Which…
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…
- R(A, B, C, D, E) has functional dependencies B → ACD, BC → AD, C → A. What is the closure {B}⁺?
- Which statement about the multivalued dependency X ↠ Y on R is correct?