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
- 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.
- 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.
- 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.
|What the schedule S says ??
Let us consider 3 schedules S1, S2, and S3. We have to check whether they are serializable with S or not ?
Example of Serial Schedule :
Consider the above schedule S. The serial schedules will be
Relation Between Serializability and Recoverability :
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.
|Classification of schedule based on recovery||How to check for Conflict Serializable Schedule ?|
Incoming search terms:
- serializability in dbms
- 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