View Serializability
- A schedule will view serializable if it is viewed as equivalent to a serial schedule.
- If a schedule is conflict serializable, then it will be view serializable.
- The view serializable which does not conflict with serializable contains blind writes.
View Equivalent
Two schedules S1 and S2 are said to be view equivalent if they satisfy the following conditions:
1. Initial Read
An initial read of both schedules must be the same. Suppose two schedules S1 and S2. In schedule S1, if a transaction T1 is reading the data item A, then in S2, transaction T1 should also read A.
The above two schedules are view equivalent because the Initial read operation in S1 is done by T1 and in S2 it is also done by T1.
2. Updated Read
In schedule S1, if Ti is reading A which is updated by Tj then in S2 also, Ti should read A which is updated by Tj.
The above two schedules are not viewed equal because, in S1, T3 is reading A updated by T2 and in S2, T3 is reading A updated by T1.
3. Final Write
A final write must be the same between both schedules. In schedule S1, if a transaction T1 updates A at last then in S2, final writing operations should also be done by T1.
The above two schedules are view equal because the Final write operation in S1 is done by T3 and in S2, the final write operation is also done by T3.
Example:
Schedule S
With 3 transactions, the total number of possible schedule
Taking first schedule S1:
Schedule S1
Step 1: final updation of data items
In both schedules S and S1, there is no read except the initial read that's why we don't need to check that condition.
Step 2: Initial Read
The initial read operation in S is done by T1 and in S1, it is also done by T1.
Step 3: Final Write
The final write operation in S is done by T3 and in S1, it is also done by T3. So, S and S1 are view Equivalent.
The first schedule S1 satisfies all three conditions, so we don't need to check another schedule.
Hence, view equivalent serial schedule is: