Schedule in DBMS

Schedule

The series of operations that take place between two transactions is known as schedule. This schedule is used to protect the order of operation in every transaction.

 

Serial Schedule

In a serial schedule, a new transaction is started only after the previous transaction is completed. One transaction must complete its cycle for the next one to be executed.

For example: Suppose there are two transactions T1 and T2 which have some operations. If it has no interleaving of operations, then there are the following two possible outcomes:

  1. Execute all the operations of T1, which was followed by all the operations of T2.
  2. Execute all the operations of T1, which was followed by all the operations of T2.
  • In the given (a) figure, Schedule A shows the serial schedule where T1 followed by T2.
  • In the given (b) figure, Schedule B shows the serial schedule where T2 followed by T1.

 

Non-Serial Schedule

If operations are allowed interleaving, then the schedule is said to be a non-serial schedule. A non-serial schedule includes multiple possible ways of execution of a transaction. Schedule C and D are non-serial schedules.

 

Serializable Schedules

Non-serial schedules are determined using the serializability of the schedules. Non-serial schedules allow transactions to occur concurrently and thus can be identified.

Schedule A and B are serial schedules, whereas Schedule C and D are non-serial schedules.