0% found this document useful (0 votes)
7 views

View Serializability

Uploaded by

yohan vishvajith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

View Serializability

Uploaded by

yohan vishvajith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

View Serializability

• Offers less restrictive definition of schedule equivalence than conflict


serializability.

• Two schedules are view serializable, If the following rules are


followed while creating the second schedule out of the first.

1 9/24/
ICT3212 Advanced Database Management Systems 2020
View Serializability

1. If in S1, T1 reads the initial value of the data item, then in S2 also,
T1 should read the initial value of that same data item.
2. If in S1, T1 writes a value in the data item which is read by T2, then
in S2 also, T1 should write the value in the data item before T2 reads
it.
3. If in S1, T1 performs the final write operation on that data item, then
in S2 also, T1 should perform the final write operation on that data
item.

2 9/24/
ICT3212 Advanced Database Management Systems 2020
View Serializability

• The idea behind view equivalence is that, as long as each read


operation of a transaction reads the result of the same write
operation in both schedules, the write operations of each transaction
must produce the same results.
• The read operations are hence said to see the same view in both
schedules.
• Condition 3 ensures that the final write operation on each data item is
the same in both schedules, so the database state should be the
same at the end of both schedules.

3 9/24/
ICT3212 Advanced Database Management Systems 2020
View Serializability

• Schedule is view serializable if it is view equivalent to a serial


schedule.
• Every conflict serializable schedule is view serializable, although
converse is not true.
• It can be shown that any view serializable schedule that is not conflict
serializable contains one or more blind writes.

9/24/2020
ICT3212 Advanced Database Management Systems 4
Example - View Serializable Schedule

• R1(A) , W2(A) , R3(A) , W1(A) , W3(A);

R1(A) , W2(A) (T1 → T2)


R1(A) , W3(A) (T1 → T3)
W2(A) , R3(A) (T2 → T3)
W2(A) , W1(A) (T2 → T1)
W2(A) , W3(A) (T2 → T3)
R3(A) , W1(A) (T3 → T1)
W1(A) , W3(A) (T1 → T3)

• There exists a cycle in the precedence graph.


• Therefore, the given schedule S is not conflict
serializable.

9/24/5
ICT3212 Advanced Database Management Systems 2020
Example - View Serializable Schedule

Dependency Graph
• T1 first reads A and T2 first updates A. So, T1 must execute before T2 and
thus the dependency T1 → T2.
• Final update on A is made by the transaction T3. So, T3 must execute
after all other transactions. Thus the dependency (T1, T2) → T3.
• From write-read sequence, the dependency T2 → T3.

• Clearly, there exists no cycle in the dependency graph.


• Therefore, the given schedule S is view serializable.
• The serialization order T1 → T2 → T3.

9/24/6
ICT3212 Advanced Database Management Systems 2020
Summary

Schedules Conflict Serializable

View Serializable

9/24/7
ICT3212 Advanced Database Management Systems 2020

You might also like