The Wayback Machine - https://web.archive.org/web/20240804171638/https://www.geeksforgeeks.org/result-serializability-in-dbms/
Open In App

Result Serializability in DBMS

Last Updated : 14 Jul, 2020
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report

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 –

  1. Result Equivalence
  2. Conflict Serializability in DBMS
  3. 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.



Similar Reads

Serializability in DBMS
In this article, we are going to explain the serializability concept and how this concept affects the DBMS deeply, we also understand the concept of serializability with some examples, and we will finally conclude this topic with an example of the importance of serializability. The DBMS form is the foundation of the most modern applications, and wh
9 min read
Precedence Graph for Testing Conflict Serializability in DBMS
A Precedence Graph or Serialization Graph is used commonly to test the Conflict Serializability of a schedule. It is a directed Graph (V, E) consisting of a set of nodes V = {T1, T2, T3..........Tn} and a set of directed edges E = {e1, e2, e3..................em}. The graph contains one node for each Transaction Ti. An edge ei is of the form Tj --
6 min read
View Serializability in DBMS
Prerequisite - Types of Schedules in DBMS  The View serializability is a concept that is used to compute whether schedules are View-Serializable or not. A schedule is said to be View-Serializable if it is view equivalent to a Serial Schedule (where no interleaving of transactions is possible).  Need of View-SerializabilityThere may be some schedule
5 min read
Polygraph to check View Serializability in DBMS
Prerequisite - Concurrency Control -Introduction, Conflict Serializability, Transaction Isolation Levels in DBMS Serializability: If any transaction (non-serial) produces an outcome that is equal to the outcome of that schedule's transaction executed serially then we can call that transaction schedule a Serializable schedule. Note: The main objecti
6 min read
Conflict Serializability in DBMS
As discussed in Concurrency control, serial schedules have less resource utilization and low throughput. To improve it, two or more transactions are run concurrently. However, concurrency of transactions may lead to inconsistency in the database. To avoid this, we need to check whether these concurrent schedules are serializable or not. Conflict Se
5 min read
Difference between Conflict and View Serializability
Prerequisite - Types of Schedules in DBMS Serializable Schedule : A transaction schedule is serializable if its outcome is equal to the outcome of its transactions executed serially i.e. sequentially without overlapping in time. A serializable schedule always leaves the database in consistent state. A serial schedule is always a serializable schedu
4 min read
What is Result Caching in Oracle?
Result Caching is a feature of the Oracle database that allows query results to be stored in memory, eliminating the need to re-execute the query and improving overall query performance. It can be used in both single-instance and clustered environments to reduce physical I/O and improve the scalability of an Oracle database. When a query is execute
4 min read
What is the result of ∞ - ∞?
It is known that a number subtracted from itself will result in the value 0, but there is the confusion that subtracting infinity from infinity is zero or not. But it's not so. In because infinity is not a Real Number. Assumptions: Firstly, assume that infinity subtracted from infinity is zero i.e., ∞ - ∞ = 0.Now add the number one to both sides of
3 min read
Need for DBMS
A Data Base Management System is a system software for easy, efficient and reliable data processing and management. It can be used for: Creation of a database.Retrieval of information from the database.Updating the database.Managing a database.Multiple User InterfaceData scalability, expandability and flexibility: We can change schema of the databa
4 min read
Introduction of Relational Model and Codd Rules in DBMS
Pre-Requisite: Relational Model in DBMS It was proposed by Dr. E.F. Codd. It uses the concept of relations to represent each and every file. Relations are Two-Dimensional Tables. It is easy to implement and easy to simplification in the operations to manipulate the data. This is the most popular data model. It is simple to implement. It uses the pr
12 min read
Article Tags :
three90RightbarBannerImg