CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following transaction schedules S1 and S2

Choose the correct option thatholds for the schedules S1 and S2.

A
S1 is non-serializable, S2 is serializable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Both S1 and S2 are non-serializable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
S1 is serializable, S2 is non serializable
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Both S1 and S2 are serializable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C S1 is serializable, S2 is non serializable
schedule S1: r1(A) w1(A) r2(B) w2(B) r1(B)
swap r2(B) and w1(A): r1(A) r2(B) w1(A) w2(B) r1(B)
swap r2(B) and r1(A): r2(B) r1(A) w1(A) w2(B) r1(B)
swap w2(B) and w1(A): r2(B) r1(A) w2(B) w1(A) r1(B)
swap w2(B) and r1(A): r2(B) w2(B) r1(A) w1(A) r1(B)
schedule S2: r1(A) w1(A) r2(A) w2(A) r1(A)

swapping r1(A) and w2(A) is not possible because read and write in two different transactions occur on the same database (A).

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Serializable Schedule
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon