×

DBMS Schedule

A schedule is a process of combining the multiple transactions into one and executing the operations of these transactions in a predefined order. A schedule can have multiple transactions in it, each transaction comprising of several tasks or operations or instructions.

A schedule can also be defined as “a sequence of operations of multiple transactions that appears for execution”. Or we can say that when several transactions are executed concurrently in the database, then the order of execution of these transactions is known as a schedule. A specific sequence of operations of a set of instructions is called a schedule.

Schedule Example

Schedule 1:

Time Transaction T1 Transaction T2
t1 Read(A)  
t2 A=A+50  
t3 Write(A)  
t4   Read(A)
t5    A+A+100
t6   Write(A)
t7 Read(B)  
t8 B=B+100  
t9 Write(B)  
t10   Read(B)
t11   B=B+50
t12   Write(B)

Types of Schedule

Schedule is of two types:

  • Serial schedule
  • Non-serial schedule

Serial Schedule

The serial schedule is a type of schedule in which the transactions are executed one after other without interleaving. It is a schedule in which multiple transactions are organized in such a way that one transaction is executed first. When the operations of first transaction complete, then next transaction is executed.

In a serial schedule, when one transaction executes its operation, then no other transaction is allowed to execute its operations.

For example:
Suppose a schedule S with two transactions T1 and T2. If all the instructions of T1 are executed before T2 or all the instructions of T2 are executed before T1, then S is said to be a serial schedule.

Below tables shows the example of a serial schedule, in which the operations of first transaction are executed first before starting another transactionT2:

Time Transaction T1 Transaction T2
t1 Read(A)  
t2 A=A+50  
t3 Write(A)  
t4 Read(B)  
t5 B=B+100  
t6 Write(B)  
t7   Read(A)
t8    A+A+100
t9   Write(A)
t10   Read(B)
t11   B=B+50
t12   Write(B)

Non-Serial Schedule

The non-serial schedule is a type of schedule where the operations of multiple transactions are interleaved. Unlike the serial schedule, this schedule proceeds without waiting for the execution of the previous transaction to complete. This schedule may give rise to the problem of concurrency. In a non-serial schedule multiple transactions are executed concurrently.

For example:

Time Transaction T1 Transaction T2
t1 Read(A)  
t2   Read(A)
t3 A=A+50  
t4   A+A+100
t5 Write(A)  
t6   Write(A)

In this schedule S, there aretwo transaction T1 and T2. If T1 and T2 transactions are executed concurrently, and the operations of T1 and T2 are interleaved. So, this schedule is an example of a non-serial schedule.


Related Topics

Secondary Key in DBMS

What are Keys? Keys in DBMS are the attributes or set of attributes that uniquely identify a row in a set of relations. A table (relation) can have a column or...

3 minutes read.

Serializability in DBMS

Serializability in DBMS Serializability is the concept in a transaction that helps to identify which non-serial schedule is correct and will maintain the database consistency. It relates to the isolation property of transaction in...

3 minutes read.

ER Diagram of Company Database in DBMS

Entity Relationship Diagram Entity Relationship Diagrams, or ER Diagrams for short, are diagrams that show the relationships among entity sets that are stored in databases. Alternatively said, ER diagrams assist in...

3 minutes read.

Evaluating DBMS

There are various database management systems available in the market. Each type has its features and can be used for varied purposes. The large number of DBMS makes it difficult...

4 minutes read.

Fragmentation in Distributed DBMS

Fragmentation is a course of isolating the entire or full information base into different sub tables or sub relations with the goal that information can be put away in various...

4 minutes read.

DBMS Generalization, Specialization, and Aggregation

DBMS Generalization Generalization is a bottom-up approach in which the common attributes of two or more lower-level entities combines to form a new higher-level entity. In generalization, the generalized entity of higher level can also...

3 minutes read.

B-Tree Insertion in DBMS

A B-tree is a special type of m-way tree, commonly used for disk access. A B-tree of order m can have at most m-1 keys and m descendants. B-trees are...

4 minutes read.

Applications of DBMS

There are various fields where a database management system is used. Following are some applications which make use of the database management system: 1. Railway Reservation System: In the railway reservation...

7 minutes read.

Advantages of Threaded Binary Tree in DBMS

We know that every node in a binary tree contains both its data value and the address pointers for its left and right children. A null pointer is used to...

3 minutes read.

Checkpoint in DBMS

A checkpoint in DBMS is used to define a point of the transaction that is in a consistent state and then all the transactions will be in the committed state...

4 minutes read.

Conflict Serializability in DBMS

Conflict Serializability A schedule is said to be conflict serializable if it can transform into a serial schedule after swapping of non-conflicting operations. It is a type of serializability that can be used...

3 minutes read.

ACID Properties in DBMS

A transaction in a database has the following four properties, known as ACID properties. These properties are used to maintain the consistency of the database in the case of system failure and concurrent...

4 minutes read.

Relational Algebra in DBMS

Relational Algebra is a widely used procedural query language, which takes instances of one or more relation as an input and generates a new relation as an output. It uses a different...

6 minutes read.

Meta Data in DBMS

Metadata: Metadata is simply described as information about information. It indicates that the data is described as well as its context. It makes data easier to find, interpret, and organize. I'll...

4 minutes read.

Inference Rules

Armstrong’s axioms are the complete set of basic inference rules used to infer all the functional dependencies on the relational database. An inference rule is a type of assertion that a user can...

2 minutes read.

DBMS Data Independence: Logical and Physical

Data Independence in DBMS: Data independence is a concept of DBMS which alters the schema of the database at one level of the database system without altering the schema definition...

2 minutes read.

Data Abstraction in DBMS

Introduction Data abstraction is a fundamental concept in database management systems (DBMS). It refers to the process of hiding the details of how data is stored and retrieved from the user,...

3 minutes read.

DBMS Languages

User can access, update, delete, and store data or information in the database using database languages. The following are the databases languages in the database management system: Data Definition Language Data Manipulation...

3 minutes read.

ER Diagram for Student Management System in DBMS

Entity Relationship diagrams Entity Relationship Diagrams, or ER Diagrams for short, are diagrams that show the relationships among entity sets that are stored in databases. Alternatively said, ER diagrams assist in...

6 minutes read.

Difference between File System and DBMS

What is File Management System? A file management system is a collection of programs that manage and store data in files and folders in a computer hard disk. A file management...

9 minutes read.