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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started