0% found this document useful (0 votes)
21 views

Introduction to Serializability in DBMS

Serializability in DBMS ensures that transactions produce equivalent outcomes whether executed serially or non-serially. There are three types of serializability: result equivalent, conflict equivalent, and view equivalent, each defined by specific conditions regarding the operations on data items. Understanding these types helps maintain data integrity and consistency in database transactions.

Uploaded by

Putta Swamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Introduction to Serializability in DBMS

Serializability in DBMS ensures that transactions produce equivalent outcomes whether executed serially or non-serially. There are three types of serializability: result equivalent, conflict equivalent, and view equivalent, each defined by specific conditions regarding the operations on data items. Understanding these types helps maintain data integrity and consistency in database transactions.

Uploaded by

Putta Swamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Introduction to Serializability in DBMS

What is Serializability in DBMS?


Example of Serializability
Consider 2 schedules, Schedule1 and Schedule2:

 Schedule1 is a serial schedule consisting of Transaction1 and Transaction2 wherein the


operations on data item A (A1 and A2) are performed first and later the operations on data
item B (B1 and B2) are carried out serially.
 Schedule2 is a non-serial schedule consisting of Transaction1 and Transaction2 wherein
the operations are interleaved.
Explanation: In the given scenario, schedule2 is serializable if the output obtained from both
Schedule2 and Schedule1 are equivalent to one another In a nutshell, a transaction within a given
non-serial schedule is serializable if its outcome is equivalent to the outcome of the same
transaction when executed serially.
Types of Serializability
A schedule can be checked for serializability in one of the 3 methods mentioned below:
1. Result Equivalent Schedule
 Two schedules, S1 and S2 are said to result equivalent if they produce the same output
obtained when the schedules are serially executed.
 Often, this kind of schedule is given the least significance since the result derived are
mainly focussed on the output which in some cases may vary for the same set of inputs or
might produce the same output for a different set of inputs.
2. Conflict Equivalent Schedule
When either of a conflict operation such as Read-Write or Write-Read or Write-Write is
implemented on the same data item at the same time within different transactions then the
schedule holding such transactions is said to be a conflict schedule. The prerequisites for such
conflict schedule are:
1. The conflict operations are to be implemented on the same data item.
2. The conflict operations (RW, WR, WW) must take place within different transactions.
3. At least one of the conflict operations must be the write operation.
4. Two Read operations will not create any conflict.
Two schedules (one being serial schedule and another being non-serial) are said to be conflict
serializable if the conflict operations in both the schedules are executed in the same order.
Example:
Consider 2 schedules, Schedule1 and Schedule2,

Schedule2 (a non-serial schedule) is considered to be conflict serializable when its conflict


operations are the same as that of Shedule1 (a serial schedule).
3. View Equivalent Schedule
Two schedules (one being serial schedule and another being non-serial) are said to be view
serializable if they satisfy the rules for being view equivalent to one another.
The rules to be upheld are:

1. Initial values of the data items involved within a schedule must be the same.
2. Final values of the data items involved within a schedule must be the same.
3. The number of WR operations performed must be equivalent for the schedules involved.
Example:
Consider 2 schedules, Schedule1 and Schedule2:
The (non-serial) Schedule2 is considered as a view equivalent of the (serial) Schedule1, when the
3 rules of view serializability are satisfied. For the example shown above,
 The Initial transaction of read operation on the data items A and B both begin at T1
 The Final transaction of write operations on the data items A and B both end at T2
 The number of updates from write-read operations are 2 in both the cases
Hence satisfying all the rules required, Schedule2 becomes view serializable w.r.t Schedule1.

You might also like