Question
Consider table Item(name, price) where name is a key, and the following two concurrent transactions. T1: Begin Transaction; S1: Insert Into Item Values ('FCDB',40); S2:
Consider table Item(name, price) where name is a key, and the following two concurrent transactions. T1:
Begin Transaction;
S1: Insert Into Item Values ('FCDB',40);
S2: Update Item Set price = price + 30 Where name = EN';
Commit;
T2:
Begin Transaction;
S3: Select Avg(price) As a1 From Item;
S4: Select Max(price) As a2 From Item;
Commit;
Assume that the individual statements S1, S2, S3, and S4 always execute atomically. Suppose initially there are two tuples in Item: (EN,20) and (RG,30). Each transaction runs once and commits. Transaction T1 always executes with isolation level Serializable. (a) If T2 executes with isolation level Read-Uncommitted, what possible pairs of values a1 and a2 are returned by T2?
(b) If T2 executes with isolation level Read-Committed, what possible pairs of values a1 and a2 are returned by T2? (c) If T2 executes with isolation level Repeatable-Read, what possible pairs of values a1 and a2 are returned by T2?
(d) If 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