0% found this document useful (0 votes)
3 views

module 5 part 2

The document discusses various concepts related to database management systems (DBMS), including schedules, serial and non-serial schedules, and the importance of serializability. It explains recoverable and cascade-less schedules, deferred database modification, and the checkpointing process for transaction recovery. Additionally, it provides examples of SQL operations related to employee data management.

Uploaded by

rahulroychonedan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

module 5 part 2

The document discusses various concepts related to database management systems (DBMS), including schedules, serial and non-serial schedules, and the importance of serializability. It explains recoverable and cascade-less schedules, deferred database modification, and the checkpointing process for transaction recovery. Additionally, it provides examples of SQL operations related to employee data management.

Uploaded by

rahulroychonedan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

DBMS

Module 5
part 2
INDEX

❑Schedules
❑Conflict equivalence
❑Recoverable and cascade-less schedules
❑Deferred database modification
❑check-pointing
SCHEDULE

• A series of operation from one transaction to another


transaction is known as schedule.
• It is used to preserve the order of the operation in each of
the individual transaction.
SERIAL SCHEDULE

• The serial schedule is a type of schedule where one transaction


is executed completely before starting another transaction.
• In the serial schedule, when the first transaction completes its
cycle, then the next transaction is executed.
NON-SERIAL SCHEDULES
• If interleaving of operations is allowed, then there will be
non-serial schedule.
• It contains many possible orders in which the system can
execute the individual operations of the transactions.
SERIALIZABLE SCHEDULE

• The serializability of schedules is used to find non-serial


schedules that allow the transaction to execute
concurrently without interfering with one another.
• It identifies which schedules are correct when executions of
the transaction have interleaving of their operations.
• A non-serial schedule will be serializable if its result is equal to
the result of its transactions executed serially.

SERIALIZABILITY is a concept that helps us to check which


schedules are serializable.
CONFLICT EQUIVALENCE
Two schedules are said to be conflict equivalent if and only if:

1. They contain the same set of the transaction.


2. If each pair of conflict operations are ordered in the same way.
RECOVERABLE SCHEDULE

A recoverable schedule is one where, for each pair of Transaction


Ti and Tj such that Tj reads data item previously written by Ti the commit
operation ofTi appears before the commit operation Tj .
CASCADE-LESS SCHEDULES

Transaction T10 writes a value of A that is read by Transaction T11.


Transaction T11 writes a value of A that is read by Transaction T12.
Suppose at this point T10 fails. T10 must be rolled back, since T11 is
dependent on T10, T11 must be rolled back, T12 is dependent on
T11, T12 must be rolled back.
This phenomenon, in which a single transaction failure leads to a
series of transaction rollbacks is called Cascading rollback.
• Restrict the schedules to those where cascading rollbacks cannot
occur, Such schedules are called Cascadeless Schedules.
• A cascadeless schedule is one where for each pair of
transaction Ti and Tj such that Tj reads data item, previously written
by Ti the commit operation of Ti appears before the read operation
of Tj
• Every Cascadeless schedule is also recoverable schedule.
DEFERRED DATABASE MODIFICATION

• The deferred modification technique occurs if the transaction does


not modify the database until it has committed.
• Ie, the changes are not applied immediately to the database.
• In this method, all the logs are created and stored in the stable
storage, and the database is updated when a transaction commits.

If database modifications occur while the transaction is still active, the


transaction is said to use the immediate-modification technique.
CHECK-POINTING
• The methodology utilized for removing all previous
transaction logs and storing them in permanent storage is
called a Checkpoint.
• A checkpoint is used for recovery if there is an unexpected
shutdown in the database.
• Checkpoints work on some intervals and write all dirty pages
(modified pages) from logs relay to data file from i.e from a
buffer to physical disk. It is also known as the hardening of
dirty pages
• It speeds up data recovery process.
Create table employee (id,name , place,designation,salary)
Begin transaction by deleting the details of employ with id
102 and later rollback the changes
Begin transaction by updating salary(increment by 10%)
and commit changes being made
use save point in the transaction
THANK YOU

You might also like