CS FundamentalsVery hardIBM · Deloitte pattern
Immediate-update recovery with a checkpoint. Log (oldest first): <T1 start>, <T1 commit>, <T2 start>, <checkpoint, active = {T2}>, <T3 start>, <T2 commit>, <T4 start>, <T3 commit>, crash. Which transactions are redone and which are undone?
- A. Redo T2, T3; undo T4
- B. Redo T1, T2, T3; undo T4
- C. Redo T2; undo T3, T4
- D. Redo T3; undo T2, T4
Correct answer: A. Redo T2, T3; undo T4
T1 committed before the checkpoint, so its changes are already on disk: ignore it. T2 and T3 committed after the checkpoint: redo. T4 never committed: undo. Redoing T1 is the common over-cautious answer.
More DBMS and SQL questions
- A file of 30,000 records (100 bytes each, unspanned) is sorted on key K and stored in 1,024-byte blocks. A primary (sparse) index on K…
- A B+ tree indexes 1,000,000 keys. Every leaf holds 100 keys and every internal node has 100 children, and all nodes are completely full…
- An ER design has entity sets E1 and E2 joined by a one-to-one relationship R. Both E1 and E2 participate TOTALLY in R, and neither has a…
- Assertion (A): In SQL, WHERE dept = NULL returns no rows even when dept contains NULL values. Reason (R): A comparison with NULL using =…
- How many of the following statements are correct? 1. A phantom read occurs when re-running a query with the same predicate returns new…
- Match each concept with its description: (P) Partial dependency (Q) Transitive dependency (R) BCNF violation (S) Multivalued dependency…