In: Computer Science
Consider the following actions taken by transaction T1 on database objects X and Y:
R(X), W(X), R(Y), W(Y)
Give an example of another transaction T2 that, if run concurrently to transaction T1 without some form of concurrency control, could interfere with T1.
GIVEN THAT:-
1) T1 transaction on objects X and Y represented in the form R(X),W(X),R(Y),W(Y).
2) In the about transaction, there is a read call on object X, then a write call to object X, then a read call on object Y, then a write call to object Y.
3) Let consider a transaction T2 which is represented by the form R(Y), W(Y).
4) The transaction T2 perform a write operation on object Y(W(Y)) before T1 perform read operation on object Y(R(Y)). After write operation perform by T2, T2 sudddenly gets aborted.
5) Now as T2 is aborted, the value of object Y read by T1 would an invalid or junk value and this causes transaction T1 also to be aborted .
6) Thus, in this way, transaction T2 interface with transaction T1 and causes T1 to get aborted.
Let me know if you have any doubts or if you need anything to change.
If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions