Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions