Question: Advanced Databases / SQL Transaction S: read(a); a=a+10; write(a); read(b); b=b*5; write(b); Transaction T: read(a); a=a*2; write(a); 1) If the initial value of a is

Advanced Databases / SQL

Transaction S:

read(a);

a=a+10;

write(a);

read(b);

b=b*5;

write(b);

Transaction T:

read(a);

a=a*2;

write(a);

1) If the initial value of a is 10 and the initial value of b is 20, what are their final values if we perform the transactions serially, using order S,T?

2) Using the same initial values, what are the final values of a and b if the order of execution is T,S?

3) Does this result have any implications for serializability?

4) Write a concurrent schedule for transactions S and T that illustrates the lost update problem.

5) Apply the standard two-phase locking protocol to the schedule you devised in step 4. Will the protocol allow the execution of that schedule? Does deadlock occur?

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!