Skip to main content

GATE CSE 2025Databases › Transactions, Concurrency Control & IndexingVerified

GATE CSE 2025 PYQ: A schedule of three database transactions T 1 , T 2 T_{1}, T_{2} T 1 ​ , T 2 ​ , and T 3 T_{3} T 3 ​ is…

A schedule of three database transactions T1,T2T_{1}, T_{2}, and T3T_{3} is shown. Ri(A)R_{i}(A) and Wi(A)W_{i}(A) denote read and write of data item AA by transaction Ti,i=1,2,3T_{i}, i=1,2,3. The transaction T1T_{1} aborts at the end. Which other transaction(s) will be required to be rolled back?
R1(X)W1(Y)R2(X)R2(Y)R3(Y)ABORT⁡(T1) R_{1}(X) W_{1}(Y) R_{2}(X) R_{2}(Y) R_{3}(Y) \operatorname{ABORT}\left(T_{1}\right)

  1. A
    Only T2T_{2}
  2. B
    Only T3T_{3}
  3. C
    Both T2T_{2} and T3T_{3}
    Correct answer
  4. D
    Neither T2T_{2} nor T3T_{3}

Answer

(C) Both T 2 T_{2} T 2 ​ and T 3 T_{3} T 3 ​

Approach

In this schedule, transaction $T_1$ writes data item $Y$ and later aborts. Both $T_2$ and $T_3$ read $Y$ before that abort, so both have performed dirty reads on data written by an uncommitted and subsequently aborted transaction. To maintain consistency, both must be rolled back.

The abort of $T_1$ causes a cascading rollback of $T_2$ and $T_3$ because both read the uncommitted value of $Y$ written by $T_1$. Hence the correct choice is C: Both $T_2$ and $T_3$.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.