100% found this document useful (1 vote)
1K views3 pages

Questions On View Serializable - EDUGRABS

The document discusses two questions regarding whether transaction schedules are view serializable. For the first schedule, the document analyzes read and write dependencies to deduce the view equivalent serial schedule is T1 → T2 → T3 → T4. For the second schedule, similar analysis of final updates, initial reads, and write-read sequences leads to the conclusion that the view equivalent serial schedule must be T1 executing before all other transactions, making the schedule view serializable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views3 pages

Questions On View Serializable - EDUGRABS

The document discusses two questions regarding whether transaction schedules are view serializable. For the first schedule, the document analyzes read and write dependencies to deduce the view equivalent serial schedule is T1 → T2 → T3 → T4. For the second schedule, similar analysis of final updates, initial reads, and write-read sequences leads to the conclusion that the view equivalent serial schedule must be T1 executing before all other transactions, making the schedule view serializable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

6/5/2017 QuestionsonViewSerializableEDUGRABS

QuestionsonViewSerializable
Question1:CheckwhethertheschedulesisViewserializableornot?R2(A);R1(A);W1(C);R3
(C);W1(B);R4(B);W3(A);R4(C);W2(D);R2(B);W4(A);W4(B)

Solution:CheckforViewEquivalentSchedule:

Step1:FinalUpdationondataitems:
A:T3T4
B:T1T4
C:T1
D:T4
SincethefinalupdationonAismadebyT4,sothe
transactionT4mustexecutebeforeT3transaction.
SincethefinalupdationonBismadebyT4,sothe
transactionT1mustexecutebeforeT3transaction.

Dependency1:(T1T3)T4.....(1)

Step2:InitialRead:
InitialRead+Whichtransactionupdatesafterread?
A:T2T1T3
B:
C:
D:

ThetransactionT2andT1readsAinitiallyfromDBwhich
isupdatedbyT3.SoT3mustexecuteafterT1andT2.

Dependency2:(T2T1)T3.....(2)

From(1)and(2)dependencies,anotherdependencycanbe
concludedas:

Dependency3:(T1T2)T3T4.....(3)
As(T2T1)mustexecutebeforeT3[From2]&T3must
executebeforeT4[From1].

Step3:WriteReadSequence(WR):
WRSeq.:Dependencies:
W1(C)R3(C)T1T3
W1(C)R4(C)T1T4
W1(B)R4(B)T1T4

W1(B)R2(B)T1T2
T1(T2T3T4)....(4)

From(3)and(4)dependencies,Weconcludetheview
equivalentserialscheduleis:
T1T2T3T4.

http://www.edugrabs.com/questionsonviewserializable/ 1/3
6/5/2017 QuestionsonViewSerializableEDUGRABS

Question2:CheckwhethertheschedulesisViewserializableornot?R1(A);R3(D);W1(B);R2
(B);W3(B);R4(B);W2(C);R5(C);W4(E);R5(E);R5(A)

Solution:CheckforViewEquivalentSchedule:

Step1:FinalUpdationonDataItems:
Dependency:
A:
B:T1T3T1T3
C:T2
D:
E:T4

Step2:InitialRead:
InitialRead:Updation:Dependency:
A:T1
B:T1T3
C:T2
D:T3T5T3T5
E:T4

Step3:WriteReadSequence:
WRSequence:Dependency:
W1(B)R2(B)T1T2
W3(B)R4(B)T3T4
W1(B)R4(B)T1T4
W4(E)R5(E)T4T5
W2(C)R5(C)T2T5

(T3T1)T4...(p)
(T2T3T4)T5...(q)
T1(T2T3T4)...(r)

FromDependency(q)and(r),wecanconcludethatT1
mustexecutebeforeallthetransaction(asT5must
executeafterT4

http://www.edugrabs.com/questionsonviewserializable/ 2/3
6/5/2017 QuestionsonViewSerializableEDUGRABS

andT5mustexecuteafterallthetransactions.

HencetheScheduleisViewSerializable.

http://www.edugrabs.com/questionsonviewserializable/ 3/3

You might also like