Prerequisite – Serializable Schedules

**Equivalence of Schedules :**

A schedule is a way of representing the order in which the operations of transactions get executed. Based on different properties related to the schedules such as end result, the order of execution of transactions two schedules might be equivalent. Equivalence of schedules is classified broadly in the following three categories –

- Result Equivalence
- Conflict Serializability in DBMS
- View Serializability in DBMS

**Result Serializability in DBMS :**

It is also known as Result Equivalent Schedule.

Two schedules S1 and S2 are said to be result equivalent if they produce the same final database state, in other words, they must produce the same result after execution. This type of equivalence is given the least importance as two schedules may produce the same result for some set of operations and different results for other sets.

**Example-1:**

Let us consider the following schedules S1 and S2 and check for result equivalence on initial values of X and Y as 2 and 5 respectively.

**Schedule S1 –**

T1 | T2 |
---|---|

R(X) | |

X=X+5 | |

W(X) | |

R(Y) | |

Y=Y+5 | |

W(Y) | |

R(X) | |

X=X*3 | |

W(X) |

**Schedule S2 –**

T1 | T2 |
---|---|

R(X) | |

X=X+5 | |

W(X) | |

R(X) | |

X=X*3 | |

W(X) | |

R(Y) | |

Y=Y+5 | |

W(Y) |

In both the above schedules, final values on substituting X and Y as 2 and 5 respectively are **X=21 AND Y=10**.

Thus, S1 and S2 are **Result Equivalent Schedules.**

**Example-2:**

Let us consider the following schedules S1 and S2 and check for result equivalence on initial values of X and Y as 3 and 6 respectively,

**Schedule S1 –**

T1 | T2 |
---|---|

R(X) | |

X=X+1 | |

W(X) | |

R(Y) | |

Y=Y*2 | |

W(Y) | |

R(X) | |

X=X*3 | |

W(X) |

**Schedule S2 –**

T1 | T2 |
---|---|

R(X) | |

X=X+1 | |

W(X) | |

R(Y) | |

Y=Y*2 | |

W(Y) |

In both the above schedules, final values on substituting X and Y as 3 and 6 respectively are –

- For S1, X = 12 and Y = 12
- For S2, X = 4 and Y = 12

The final values after complete execution of the schedules are different in both the schedules. This is because they both have different sets of operations. Thus, S1 and S2 are **not Result Equivalent Schedules**.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- View Serializability in DBMS Transactions
- Conflict Serializability in DBMS
- Precedence Graph For Testing Conflict Serializability in DBMS
- Difference between Conflict and View Serializability
- Lossless Decomposition in DBMS
- Introduction of Relational Algebra in DBMS
- Need for DBMS
- Commonly asked DBMS interview questions | Set 1
- Normal Forms in DBMS
- Relational Model in DBMS
- Commonly asked DBMS interview questions | Set 2
- Concurrency Control in DBMS
- Recoverability in DBMS
- Last Minute Notes - DBMS
- ACID Properties in DBMS
- DBMS Architecture 2-Level, 3-Level
- Introduction of DBMS (Database Management System) | Set 1
- Introduction of 3-Tier Architecture in DBMS | Set 2
- Introduction of Relational Model and Codd Rules in DBMS
- Canonical Cover of Functional Dependencies in DBMS

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.