Question: transaction management (12 marks) (a) (6 marks) Consider a database with objects A, B and C, and the following two trans- actions T1 and T2

transaction management
(12 marks) (a) (6 marks) Consider a database with objects A, B and C, and the following two trans- actions T1 and T2 involving those objects: T1 T2 begin transaction begin transaction read (A) read (B read( If A-: 100, C := C+1 write (B) write(C) commit read (A) read (B) read (C) B:# B+ 15 C C+1 write (A) write (C) commit Let the initial values of A and B be 100, and the initial value of b o. Also let the consistency requirement be either A 100 or B 100 (G) Show that every serial execution of these two transactions preserves the consis- (ii) Give an example of a non-serial schedule involving all the operations that con- tency of the database. stitute transactions Ti and T2 such that it (the non-serial schedule schedule you constructed) results in a lost update problem. (iii) Explain how the use of two-phase locking protocol can resolve the lost update problem as identified i () above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
