Question: Consider the following two transactions: T1: read (A); read (B); if A = 0then B: = B + 1; write (B). T2: read (B); read

Consider the following two transactions:

T1: read (A); read (B); if A = 0then B: = B + 1; write (B).

T2: read (B); read (A); if B = 0 then A: = A + 1; write (A).

Let the consistency requirement be A = 0 ∨ B = 0, with A = B = 0 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 T1 and T2 that produces a nonserializable schedule.

c. Is there a concurrent execution of T1 and T2 that produces a serializable schedule?

Step by Step Solution

3.47 Rating (180 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a There are two possible executions T T and T T Case 1 A B initially 00 after T ... View full answer

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

Document Format (1 attachment)

Word file Icon

16-CS-DB (324).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!