CS FundamentalsHardGATE CS · PSU (ISRO/BARC)
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): <T2 start>, <T4 start>, <T2, A>, <T3 start>, <T1 start>, <T4, B>, <T1, C>, <T3, D>, <T5 start>, <T3 commit>, <T5, E>, <checkpoint {T1, T2, T4, T5}>, <T5, F>, <T4, G>, <T1, H>, <T5 commit>, <T2, I>, <T1 commit> Which transactions must be undone and which redone?
- A. Undo {T1, T5}; redo {T2, T4}
- B. Undo {T2, T4}; redo {T1, T3, T5}
- C. Undo {T2, T4}; redo {T1, T5}
- D. Undo {T2, T4}; redo {T1}
Correct answer: C. Undo {T2, T4}; redo {T1, T5}
Transactions that committed before the checkpoint (T3) are already on disk and need nothing. Those that committed after it (T1, T5) are redone, whether they started before or after it. Those with no commit record (T2, T4) are undone, including any that were active at the checkpoint.
More DBMS and SQL questions
- T1 has 3 operations, T2 has 2 and T3 has 2. How many concurrent schedules (interleavings that keep each transaction's own order) exist…
- A query must list departments whose average salary exceeds 50000, considering only employees hired after 2020. Which clause placement is…
- 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 CE → A, A → CE, BE → A, BC → E, E → BC. What is the highest normal form R satisfies?
- A transaction has executed its final statement, but its commit record is not yet on stable storage. Which state is it in?
- R(A, B, C, D, E, F) has functional dependencies EF → D, B → C, D → BF, A → E. How many superkeys does R have?