A schedule of three database transactionsT1 , T2 and T3 is shown. Ri (A) and Wi (A) denote read and write of data item 𝐴 by transaction Ti , 𝑖 = 1,2,3. The transaction T1 aborts at the end. Which other transaction(s) will be required to be
rolled back?
R₁(X) W₁(Y) R₂(X) R₂(Y) R₃(Y) ABORT(T₁)
A.
Only 𝑇2
B.
Only 𝑇3
C.
Both 𝑇2 and 𝑇3
D.
Neither 𝑇2 nor 𝑇3
Solution:
Given schedule is
T1 | T2 | T3 |
R(X) | ||
R(Y) | ||
R(X) | ||
R(Y) | ||
R(Y) | ||
Abort |
As W₁(Y) is read by both T₂ and T₃ before T₁ commits, aborting T₁ requires rolling back both T₂ and T₃.