Open In App

Condition of schedules to View-equivalent

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

In a database system, a schedule is a sequence of operations (such as read and write operations) performed by transactions in the system. Two schedules are view-equivalent if they produce the same set of results when executed against the same database state.

A schedule S1 is said to be view-equivalent to a schedule S2 if and only if:

The order of any two conflicting operations in S1 is the same as the order of those operations in S2. A conflicting operation is an operation that accesses the same data item as another operation and at least one of the operations is a write operation.

The order of any two non-conflicting operations can be interchanged without changing the results produced by the schedules.

In other words, two schedules are view-equivalent if they produce the same results regardless of the order in which non-conflicting operations are executed, and the order of conflicting operations is the same in both schedules.

The condition of schedules to be view-equivalent is important because it determines whether two schedules can be considered equivalent for purposes such as concurrency control, recovery, and replication. If two schedules are view-equivalent, it means that they are interchangeable in terms of their results, and the system can choose to execute either one without affecting the consistency or correctness of the database.

View-equivalence is a weaker condition than conflict serializability, which requires that two schedules be equivalent in terms of the order in which transactions are executed. View equivalence allows for more concurrency and flexibility in scheduling, as long as the results produced by the schedules are the same.

Two schedules S1 and S2 are said to be view-equivalent if the below conditions are satisfied : 

1) Initial Read: If a transaction T1 reads data item A from the database in S1 then in S2 also T1 should read A from database. 

  T1     T2     T3
-------------------
        R(A)
 W(A)          
               R(A)
        R(B)

Transaction T2 is reading A from the database. 

2) Updated Read: If Ti is reading A which is updated by Tj in S1 then in S2 also Ti should read A which is updated by Tj.  

  T1     T2     T3         T1    T2    T3                   
-------------------       ----------------
 W(A)                    W(A)       
         W(A)                               R(A)
                 R(A)               W(A)

Above two schedules are not view-equivalent as in S1 :T3 is reading A updated by T2, in S2 T3 is reading A updated by T1. 

3) Final Write operation: If a transaction T1 updated A at last in S1, then in S2 also T1 should perform final write operations.  

 T1       T2        T1     T2            
------------    ---------------
 R(A)              R(A)
         W(A)     W(A)
 W(A)                    W(A)

Above two schedules are not view-equivalent as Final write operation in S1 is done by T1 while in S2 done by T2. 

View Serializability: A Schedule is called view serializable if it is view equal to a serial schedule (no overlapping transactions). 

 


Last Updated : 13 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads