Serial Schedule vs Non-Serial Schedule in Database Transactions

Serial Schedule vs Non-Serial Schedule in Database Transactions

Serial Schedule vs Non-Serial Schedule  in Database Transactions

 Schedule

When multiple transactions are executing concurrently, then the order of execution of operations from the various transactions is known as schedule.

  • Serial Schedule
  • Non-Serial Schedule

Serial Schedule
Transactions are executed one by one with out any interleaved operations from other transactions.

Non-Serial Schedule
A schedule where the operations from a set of concurrent transactions are interleaved.

What is Serializability?
A given non serial schedule of n transactions are serializable if it is equivalent to some serial schedule.That is this non serial schedule produce the same result as of the serial schedule. Then the given non serial schedule is said to be serializable.A schedule that is not serializable is called a non-serializable.

Non-Serial Schedule Classification

  • Serializable
  • Not Serializable
  • Recoverable
  • Non Recoverable

Serializable Schedule Classification

  • Conflict Serializable
  • View Serializable 

Conflict Serializable Schedule
If a schedule S can be transformed into a schedule S’ by a series of swaps of non conflicting instruction then we say that S and S’ are conflict equivalent.A schedule S is called conflict serializable if it is conflict equivalent to a serial schedule.

View Serializable Schedule
All conflict serializable schedule are view serializable.But there are view serializable schedule that are not conflict serializable.A schedule S is a view serializable if it is view equivalent to a serial schedule.

Recoverable Schedule Classification

  • Cascade
  • Cascadeless

To recover form the failure of a transaction Ti, we may have to rollback several transactions. This phenomenon in which a single transaction failure leads to a series of transaction roll back is called cascading roll back.Avoid cascading roll back by not allowing to read uncommitted data. But this lead to a serial schedule.