Question: Consider the following two transactions: T 13 : read( A ); read( B ); if A = 1 then B := B - 1; write(

Consider the following two transactions:

T13: read(A);

read(B);

if A = 1 then B := B - 1;

write(B).

T14: read(B);

read(A);

if B = 1 then A := A - 1;

write(A).

Let the consistency requirement be A = 1 or B = 1, with A = 1 and B = 1 as the initial values.

a. Show that every serial execution involving these two transactions preserves the consistency of the database.

b. Show a concurrent execution of T13 and T14 that produces a nonserializable schedule.

c. Is there a concurrent execution of T13 and T14 that produces a serializable schedule?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!