View Serializability In DBMS

Introduction

  • If a schedule is view equivalent to a serial schedule, then it will be view serializable
  • If the schedule is serializable via conflict, then it shall be view serializable as well.
  • The view serializable which has no conflict serializable has blind writes.

 

View Equivalent

Schedules S1 and schedule S2 will; be view equivalent if the following conditions are satisfied:

1. Initial Read

The initial read of S1 and S2 has to be the same. If in S1, the transaction T1 is reading the data A, then in schedule S2, T1 will have to read A as well.

 

2. Updated Read

In S1, if T1 is reading data A which gets updated by T2, then in S2, T1 has to read A that is updated by T2.

 

3. Final Write

The final write has to be similar in S1 and S2. In S1, if T1 updates data A at the end, then in S2, the final write operation shall also be done by T1.

If there are X number of transactions, then the maximum number of schedules will be the factorial of X.

T1

T2

T3

Read (A)

 

 

Write (A)

 

 

 

Write (A)

 

 

 

Write (A)

 

Schedule S1

First step: Last update of the data items

No need of checking that condition as there isn’t any read in s and S1 except initial read

Second step: Initial read

T1 does the initial read in S as well as S1

Third step: Final write

T3 does the final write task in S and S1. Therefore, S1 and S are view equivalent.

S1 meets all the conditions, and so there is no need of checking any other schedule.

 

Therefore, the view equivalent schedule is

T1-T2-T3