ISRO Scientist/Engineer CSE 2018Databases › Transactions and Concurrency Control
ISRO Scientist/Engineer CSE 2018 PYQ: Let us assume that transaction $T1$ has arrived before transaction $T2$. Consider the schedule…
Let us assume that transaction $T1$ has arrived before transaction $T2$. Consider the schedule $s=r1(A);r2(B): w2(A); w1(B)$
Which of the following is true?
- AAllowed under basic timestamp protocol.
- BNot allowed under basic timestamp protocols because $T1$ is rolled back.Correct answer
- CNot allowed under basic timestamp protocols because $T2$ is rolled back.
- DNone of these
Answer
(B) Not allowed under basic timestamp protocols because $T1$ is rolled back.
Approach
Apply the basic timestamp ordering (TO) protocol rules. Since T1 arrived before T2, TS(T1) < TS(T2). For each conflicting pair of operations on the same data item, the one with the smaller timestamp must execute first. Check each conflict in the schedule s = r1(A); r2(B); w2(A); w1(B).
Reviewed by ISRO IQ Editorial Team.