Intro to DBMS

Serializability In DBMS

As we know, some non-serial schedules are also consistent and behave like serial schedules. The concept of Serializability is used to check whether the given non-serial schedule is serial or not.

According to Serializability 

“If a given non-serial schedule of ‘n’ transactions is equivalent to some serial schedule of ‘n’ transactions, then it is called a serializable schedule.”

 

Note:

  • Non-serial schedules are also called parallel schedules.
  • Serializable schedules are also called serial schedules.

 

Example of Serializability

Suppose there are 3 transactions (T1, T2, T3) where T1 executes first and then T2 and T3. Then, the serial schedule will contain the following series of transaction executions.

T1→T2→T3

Non-serial must contain a series where any transaction cannot repeat itself, just like the above serial schedule, but the position of the transaction can be interchanged. So, Non-serial will be one of the following if it is serializable.

  • T1→T2 →T3
  • T1→T3 →T2
  • T2→T1 →T3
  • T2→T3 →T1
  • T3→T1 →T2
  • T3→T2 →T1

If a schedule contains a series of transactions where transactions are repeating, like T1→T2 →T1 →T3 where T1 is repeating, then that series will not be serial.

Types of Serializability

Serializability is mainly of two types

Types of Serializability in dbms

We will explain both topics in the next lecture.