Consider the following two transactions: (SHOW WORK) 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?

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter10: Transaction Management And Concurrency Control
Section: Chapter Questions
Problem 7P
icon
Related questions
Question
100%

Consider the following two transactions: (SHOW WORK)

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?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Transaction Processing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning