The serial execution of a transaction is defined as Schedule. It is made up of a number of transactions each comprising of a number of instructions.
- Serial Schedules
- Non-Serial Schedules
Calculation of Number of Schedules :
Consider there to be N number of transactions t1, t2, t3, …., tN with k1, k2, k3, ….., kN number of operations respectively.
- Total Number of Schedules –
(N1 + N2 + N3 + ..... + Nn)! / (N1! * N2! * N3! * ... * Nn!)
- Number of Serial Schedules –
It is all possible permutations of n transactions = N!
- Number of Non-Serial Schedules –
Total Schedules = Serial Schedules + Non-Serial Schedules
Number of Non-Serial Schedules = Total Number of Schedules – Number of Serial Schedules
N! - ((N1 + N2 + N3 + ..... + Nn)! / (N1! * N2! * N3! * ... * Nn!))
Consider there to be three transactions with 1, 2, and 3 operations respectively.
We have to find –
- Total number of schedules possible.
- Total number of serial schedules and non-serial schedules possible.
Total Number of Schedules,
= (1 + 2 + 3)! / (1! + 2! + 3!) = 6! / 9 = 120 Number of Serial Schedules, = 3! = 6 Number of Non-Serial Schedules, = Total Number of Schedules - Number of Serial Schedules = 120 - 6 = 114
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Types of Schedules in DBMS
- Types of Schedules based Recoverability in DBMS
- Calculation of TCP Checksum
- Serial Binary Adder in Digital Logic
- Algorithm for Dynamic Time out timer Calculation
- Difference between Serial Adder and Parallel Adder
- Need for DBMS
- Cascadeless in DBMS
- Difference between DDL and DML in DBMS
- Difference between 1NF and 2NF in DBMS
- Disadvantages of DBMS
- History of DBMS
- The CAP Theorem in DBMS
- Interfaces in DBMS
- Deadlock in DBMS
- Difference between 2NF and 3NF in DBMS
- Starvation in DBMS
- Recoverability in DBMS
- Data Replication in DBMS
- DBMS Full Form
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.