Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions