Question: need help with these questions. (b) (4 marks) Consider a database with objects X and Y, and the following two transactions T1 and T2 involving

need help with these questions.
(b) (4 marks) Consider a database with objects X and Y, and the following two transactions T1 and T2 involving those objects T1 T2 begin transactionbegin transactiorn read(X); read(Y); x = x-Y write (X); read(Y) read(X); read (Y); X = X+ 10 Y=X-Y write(X); write (Y) (i) Give an example of a schedule involving transactions T1 and TQ that results in (ii) Add lock and unlock instructions to the transaction Tl (iii) Explain how the use of two-phase locking protocl can esolve the conflict you a write-write conflict (lost update) observe the two-phase locking protocol (2PL) identified in part (i) above. that they (c) (4 marks) (i) Discuss whether any concurrent execution of hese two transactions T1 and T2 shown in part (b) can result in a deadlo (ii) Verify whether the lock/unlock inst^nctions that you introduced in part b(ii) eadlock, explain how it could have been above lead to a deadlock. I prevented
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
