DBMS Concepts

DBMS Tutorial Components of DBMS. Applications of DBMS The difference between file system and DBMS. Types of DBMS DBMS Architecture DBMS Schema Three Schema Architecture. DBMS Languages.

DBMS ER Model

ER model: Entity Relationship Diagram (ERD) Components of ER Model. DBMS Generalization, Specialization and Aggregation.

DBMS Relational Model

Codd’s rule of DBMS Relational DBMS concepts Relational Integrity Constraints DBMS keys Convert ER model into Relational model Difference between DBMS and RDBMS Relational Algebra DBMS Joins

DBMS Normalization

Functional Dependency Inference Rules Multivalued Dependency Normalization in DBMS: 1NF, 2NF, 3NF, BCNF and 4NF

DBMS Transaction

What is Transaction? States of transaction ACID Properties in DBMS Concurrent execution and its problems DBMS schedule DBMS Serializability Conflict Serializability View Serializability Deadlock in DBMS Concurrency control Protocols

Difference

Difference between DFD and ERD

Misc

Advantages of DBMS Disadvantages of DBMS Data Models in DBMS Relational Algebra in DBMS Cardinality in DBMS Entity in DBMS Attributes in DBMS Data Independence in DBMS Primary Key in DBMS Foreign Key in DBMS Candidate Key in DBMS Super Key in DBMS Aggregation in DBMS Hashing in DBMS Generalization in DBMS Specialization in DBMS View in DBMS File Organization in DBMS What Is A Cloud Database What Is A Database Levels Of Locking In DBMS What is RDBMS Fragmentation in Distributed DBMS What is Advanced Database Management System Data Abstraction in DBMS Checkpoint In DBMS B Tree in DBMS BCNF in DBMS Advantages of Threaded Binary Tree in DBMS Advantages of Database Management System in DBMS Enforcing Integrity Constraints in DBMS B-Tree Insertion in DBMS B+ Tree in DBMS Advantages of B-Tree in DBMS Types of Data Abstraction in DBMS Levels of Abstraction in DBMS 3- Tier Architecture in DBMS Anomalies in Database Management System Atomicity in Database Management System Characteristics of DBMS DBMS Examples Difference between Relational and Non-Relational Databases Domain Constraints in DBMS Entity and Entity set in DBMS ER Diagram for Banking System in DBMS ER Diagram for Company Database in DBMS ER Diagram for School Management System in DBMS ER Diagram for Student Management System in DBMS ER Diagram for University Database in DBMS ER Diagram of Company Database in DBMS Er Diagram Symbols and Notations in DBMS How to draw ER-Diagram in DBMS Integrity Constraints in DBMS Red-Black Tree Deletion in DBMS Red-Black Tree Properties in DBMS Red-Black Tree Visualization in DBMS Redundancy in Database Management System Secondary Key in DBMS Structure of DBMS 2-Tier Architecture in DBMS Advantages and Disadvantages of Binary Search Tree Closure of Functional Dependency in DBMS Consistency in Database Management System Durability in Database Management System ER Diagram for Bank Management System in DBMS ER Diagram for College Management System in DBMS ER Diagram for Hotel Management System in DBMS ER Diagram for Online Shopping ER Diagram for Railway Reservation System ER Diagram for Student Management System in DBMS Isolation in DBMS Lossless Join and Dependency Preserving Decomposition in DBMS Non-Key Attributes in DBMS Data Security Requirements in DBMS DBMS functions and Components What is Homogeneous Database? DBMS Functions and Components Advantages and Disadvantages of Distributed Database Relational Database Schema in DBMS Relational Schema

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.