in Databases
100 views
1 vote
1 vote

Someone Please Solve itimage

in Databases
100 views

1 Answer

0 votes
0 votes
Timestamp ordering protocol ensures that any conflicting read and write operations are executed in timestamp order. – Page 682, 15.4, Database System Concepts, Korth.

 

A). Ti wants to write an item Q and TS(Ti) > R-timestamp(Q) means Ti wants to write an item Q which has been read by a previous Transaction. 

Tj

Ti

Read(Q)

 

 

Write(Q)

     

 Here TS(Tj) < TS(Ti) and the conflicting operation Rj(Q) → Wi(Q) is executed in order of their timestamps hence Ti         won’t rollback and therefore option A is incorrect.

 

Similarly,

B). TS(Tj) < TS(Ti) and the conflicting operation Wj(Q) → Wi(Q) is executed in order of their timestamps hence Ti won’t rollback and therefore option B is incorrect.

Tj

Ti

Write(Q)

 

 

Write(Q)

 

     

 

D). TS(Tj) < TS(Ti) and the conflicting operation Wj(Q) → Ri(Q) is executed in order of their timestamps hence Ti won’t rollback and therefore option D is incorrect.

Tj

Ti

Write(Q)

 

 

Read(Q)

      

 

C). TS(Ti) < TS(Tn) and the conflicting operation Wn(Q) → Ri(Q) is NOT executed in order of their timestamps hence Ti will rollback and therefore option C is correct.

Ti

Tn

 

Write(Q)

Read(Q)

 

     

Finally, Options A,B,D are incorrect and therefore the correct answer.