Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

make an ERD chart

Answered: 1 week ago