CS FundamentalsVery hardGATE CS (PYQ pattern)
Under the deferred database modification scheme with a log, a crash occurs. The log holds <T1 start>, <T1,A,5>, <T1 commit>, <T2 start>, <T2,B,7>, <T3 start>, <T3,C,9>, <T3 commit>. Which transactions are redone and which are simply ignored (no undo is ever needed)?
- A. Redo T1 and T3; ignore T2
- B. Redo T1, T2 and T3
- C. Redo T3 only; undo T1 and T2
- D. Redo T1 and T3; undo T2
Correct answer: A. Redo T1 and T3; ignore T2
With deferred modification nothing reaches the database before commit, so uncommitted T2 has changed nothing and needs no undo. Committed T1 and T3 are redone.
More DBMS and SQL questions
- Under strict 2PL, T1 and T2 both hold S(A) and each now requests X(A) (a lock upgrade). T3 holds S(B) and requests X(A). T4 holds X(C) and…
- An ER diagram has a supertype PERSON(pid, name) with disjoint, total specialisation into STUDENT(gpa) and TEACHER(salary). Using the 'one…
- Relations R(A, B, C) with key A and S(C, D) with key C, where R.C is a foreign key to S. A row of S that is referenced by some R rows is…
- PA(id, k): (1,1), (2,2), (3,2), (4,3), (5,NULL), (6,4). PB(k, z): (1,9), (2,9), (2,8), (NULL,7). Let p = rows of SELECT FROM PA LEFT JOIN…
- GB(id, v): (1,5), (2,12), (3,18), (4,25), (5,31), (6,39), (7,NULL). The query SELECT v / 10, COUNT() FROM GB GROUP BY v / 10 uses integer…
- Three transactions each execute R(A) followed by W(A) on the same item A. Among all interleavings of the six operations (each…