Question
Consider table Product(Item,Price) where Item is a key, and the following two concurrent transactions. T1: Begin Transaction update Product set Price = 2*Price where Item
Consider table Product(Item,Price) where Item is a key, and the following two concurrent transactions.
T1:
Begin Transaction
update Product set Price = 2*Price where Item = Laptop;
insert into Product values (Printer,$100);
Commit;
T2:
Begin Transaction
select max(Price) as a1 from Product;
select max(Price) as a2 from Product;
Commit;
Assume that the individual statements in a given transaction always execute atomically. Suppose initially there are two tuples in Item: (Laptop, 1000), (PC,900). Each transaction runs once and commits. Transaction T1 always executes with isolation level Serializable.
(a) If transaction T2 executes with isolation level Read-Uncommitted, what possible pairs of values a1 and a2 are returned by T2.
(b If transaction T2 executes with isolation level Read-Committed, what possible pairs of values a1 and a2 are returned by T2.
(c) If transaction T2 executes with isolation level Repeatable-Read, what possible pairs of values a1 and a2 are returned by T2.
(d) If transaction T2 executes with isolation level Serializable, what possible pairs of values a1 and a2 are returned by T2.
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