Serialisable schedules, Database Management System

Serialisable Schedules:If the processes of two transactions conflict with each other, how to verify that no concurrency related problems have happened? For this, serialisability theory has been developed. Serialisability theory attempts to verify the correctness of the schedules. The rule of this theory is:

"A schedule S of n transactions is serialisable if it is equal to some serial schedule of the similar 'n' transactions".

A serial schedule is a schedule in which either transaction T1 is totally done before T2 or transaction T2  is totally done before T1. For instance, the following figure clears the two possible serial schedules of transactions T1  & T2.

Schedule A: T2 followed by T1

Schedule B: T1 followed by T2

Schedule

T1

T2

Schedule

T1

T2

Read X

 

Read X

Read X

Read X

 

Read Y

 

Read Y

Subtract 100

Subtract 100

 

Display X+Y

 

Display X+Y

Write X

Write X

 

Read X

Read X

 

Read Y

Read Y

 

Subtract 100

Subtract 100

 

Add 100

Add 100

 

Write X

Write X

 

Write Y

Write Y

 

Read Y

Read Y

 

Read X

 

Read X

Add 100

Add 100

 

Read Y

 

Read Y

Write Y

Write Y

 

Display X+Y

 

Display X+Y

                                                                         Figure: Serial Schedule of two transactions

Schedule C: An Interleaved Schedule

Schedule

T1

T2

Read X

Read X

 

Subtract 100

Subtract 100

 

Read X

 

Read X

Write X

Write X

 

Read Y

 

Read Y

Read Y

Read Y

 

Add 100

Add 100

 

Display X+Y

 

Display X+Y

Write Y

Write Y

 

                                                                           Figure: An Interleaved Schedule

Now, we have to figure out whether this interleaved schedule would be performing read and write in the same order as that of a serial schedule. If it does, then it is equivalent to a serial schedule, otherwise not. In case it is not equivalent to a serial schedule, then it may result in problems due to concurrent transactions.

Posted Date: 3/12/2013 2:00:21 AM | Location : United States







Related Discussions:- Serialisable schedules, Assignment Help, Ask Question on Serialisable schedules, Get Answer, Expert's Help, Serialisable schedules Discussions

Write discussion on Serialisable schedules
Your posts are moderated
Related Questions
What is Thread splitting A thread of control is a path by which a set of state diagrams on that a single object is active at a time. Objects are shared between threads

Improved performance: As the data is located near the site of its demand, and given the inherent parallelism because of multiple copies, speed of database access may be good for di

What is transaction? Transaction is a unit of program implementation that accesses and possibly updated several data items.

The File Based System File based systems are an early attempt to computerise the manual filing system. For example, a manual file can be set up to hold all the correspondence r

Write short notes on Schema diagram. A database schema along with primary key and foreign key dependencies can be depicted pictorially by schema diagram. Every relation appears

Differentiate between Procedural and non procedural languages ? Procedural and non procedural languages - A procedural language specifies the operations to be performed on th

Explain the use of constraints in functional model with suitable example. A constraint shows relationship between two objects at same time, or   among various values of the sam


Drawbacks of Data Distribution: The primary drawbacks of distributed database systems are the added complexity needed to ensure proper coordination between the sites. This increas

State as Location within a Program In this traditional approach, location of control inside a program totally defines the program state. Any finite state machine may be implem