Question: Problem 1: Isolation Levels and Conflicts (20 points) Consider the following queries: Q1: SELECT * from Movies where rating-1 Q2: INSERT INTO Movies(mid, name, rating)

 Problem 1: Isolation Levels and Conflicts (20 points) Consider the following

Problem 1: Isolation Levels and Conflicts (20 points) Consider the following queries: Q1: SELECT * from Movies where rating-1 Q2: INSERT INTO Movies(mid, name, rating) VALUES (123, 'Dark Knight', 1) Let S be a schedule involving two transactions running these queries defined as: S: Q1(T,), Q2(T2), Commit (T2), Q1(Ti) a. Assuming tuple-level locking during insertions, explain why phantom reads may occur under the REPEATABLE-READ isolation level (5 points) How do commercial database systems avoid the phantom problem under SERIALIZABLE isolation level? (Hint: Lock Granularity) (5 points) b. Consider the following queries Q3: SELECT * from Movies where rating-1 Q4: UPDATE Movies SET name-'new name' where rating 1 Let S1 and S2 be two schedules defined as: S1: Q3(T,), Q4(T2), Commit (T2), Q3(T,) S2: Q3(T), Q4(T2), Abort (T). C(T1) For each schedule, determine the possible outcomes if both transactions execute under the isolation levels of (a) T1: READ-UNCOMMITTED and T2: READ-COMMITTED and (b) T1, T2: READ-COMMITTED. Briefly explain the occurrence of any undesirable phenomenon in each scenario. (5*2-10 points)

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!