Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 () aboveStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started