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): <T4 start>, <T1 start>, <T4, A>, <T4 commit>, <T1, B>, <checkpoint {T1}>, <T5 start>, <T3 start>, <T3, C>, <T2 start>, <T5, D>, <T1, E>, <T2, F>, <T2 commit>, <T1 commit>, <T3 commit> Which transactions must be undone and which redone?
- A. Undo {T1, T2, T3}; redo {T5}
- B. Undo {T5}; redo {T2, T3}
- C. Undo {T5}; redo {T1, T2, T3}
- D. Undo {T5}; redo {T1, T2, T3, T4}
Correct answer: C. Undo {T5}; redo {T1, T2, T3}
Transactions that committed before the checkpoint (T4) are already on disk and need nothing. Those that committed after it (T1, T2, T3) are redone, whether they started before or after it. Those with no commit record (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 CE → A, B → AC, BE → CD, DE → B. How many superkeys does R have?
- Classify the schedule W1(B), W2(A), R2(B), C2, W1(A), C1 (Ci = commit of Ti) by the strongest property it satisfies.
- R(A, B, C, D, E) has functional dependencies CE → A, A → D, AC → DE, B → D. How many superkeys does R have?
- R(A, B) = {(1, 1), (1, 3), (3, 1), (3, 2), (3, 3)} and S(B, C) = {(1, 5), (2, 5), (2, 6), (2, 7), (4, 6)}. How many tuples are in πA(R ⋈…
- R(A, B, C, D, E, F) has functional dependencies AE → F, A → BCD, F → B. What is the closure {AC}⁺?
- Assertion (A): For every relation schema there is a decomposition into 3NF relations that is lossless and dependency preserving. Reason…