Serializability in Database

A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the ‘n’ transactions. Every serializable schedule is consistent i.e. it is not suffering from RW, WR, WW etc.
The concept of serializability of schedules is used to identify which schedules are correct when transaction executions have interleaving of their operations in the schedules. Serializable schedules are always considered to be correct when concurrent transactions are executing.

Difference between serial schedule and a serializable schedule

  1. The main difference between the serial schedule and the serializable schedule is that in serial schedule, no concurrency is allowed whereas in serializable schedule, concurrency is allowed.
  2. In serial schedule, if there are two transaction executing at the same time and if no interleaving of operations is permitted, then there are only two possible outcomes :
    • Execute all the operations of transaction T1 (in sequence) followed by all the operations of transaction T2 (in sequence).
    • Execute all the operations of transaction T2 (in sequence) followed by all the operations of transaction T1 (in sequence).

    In Serializable Schedule, if there are two transaction executing at the same time and if interleaving of operations is allowed, there will be many possible orders in which the system can execute the individual operations of the transactions.

  3. In serializable schedule, the concurrent execution of schedule should be equal to any serial schedule so that schedules are always considered to be correct, when transaction executions have interleaving of their operations in the schedules.
Example of Serializable Schedule

Let us consider a schedule S.

Serializable - Serializability in Database What the schedule S says ??

  • Read A after updation.
  • Read B before updation.

Let us consider 3 schedules S1, S2, and S3. We have to check whether they are serializable with S or not ?

Serializable Schedule or not - Serializability in Database

Example of Serial Schedule :

Consider the above schedule S. The serial schedules will be

Serial Schedule Example - Serializability in Database

Relation Between Serializability and Recoverability :

Relation Between Serializability and Recoverability - Serializability in Database

When are 2 schedules equivalent?

There are three types of equivalence of schedules :

  • Result equivalence
  • Conflict equivalence
  • View equivalence

Based on the types of equivalence, we define the types of serializability. There are accordingly three types of serializability which are:

  • Results serializable
  • Conflict serializable
  • View serializable

Result Equivalence and Result Serializable :

In results equivalence, the end result of schedules heavily depend on input of schedules. The final values are calculated from both schedules (given and serial) and check whether they are equal.
Result Serializable are not generally used because of lengthy process.

Result Equivalence - Serializability in Database

Click here for Conflict Equivalence and Conflict Serializable

Click here for View Equivalence and view serializable


Previous Home Next
Classification of schedule based on recovery How to check for Conflict Serializable Schedule ?

     

Incoming search terms:

  • serializability in dbms
  • serializability
  • serializability in dbms examples
  • what is serializability in dbms
  • serialization in dbms
  • types of serializability in dbms
  • what is serializability
  • difference between serial schedule and serializable schedule with example
  • types of serializability
  • serializibility in dbms

Leave a Reply