Serialisable schedules, Database Management System

Assignment Help:

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.


Related Discussions:- Serialisable schedules

Explain view in rdbms, Explain view in RDBMS? View - A view is a relati...

Explain view in RDBMS? View - A view is a relation (virtual rather than base) and could be used in query expressions, which is, queries can be written by using the view as a re

Draw the E/R diagrams, for the following business rules . Identify all enti...

for the following business rules . Identify all entities, attributes, relationships, primary keys, cardinalities and constraints where appropriate 3. (9) An art museum owns a larg

Data model, data models are being replaced over years. Reasons and why does...

data models are being replaced over years. Reasons and why does that happen?

What is a name, What is a Name? A user-supplied name is used for identi...

What is a Name? A user-supplied name is used for identity. This form of identity is used for files in file systems. The user gives every file a name that uniquely identifies it

What are the features of embedded sql explain, What are the features of emb...

What are the features of embedded SQL? Explain. Embedded SQL - SQL could be implemented within two ways. It can be used interactively or embedded in a host language or throu

What is association, What is association? Give an example of association ...

What is association? Give an example of association Association is used for establishing relationships among classes. Association describe links among/between classes. For exa

What are called index-sequential files, What are called index-sequential fi...

What are called index-sequential files? The files that are ordered sequentially with a primary index on the search key are known as index-sequential files

Design a large scale system, Question: (a) Why is it important to know...

Question: (a) Why is it important to know the architecture rather than to start requirement capture when designing a large scale system? (b) Who are the different people in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd