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
Create role named role_table that allows a user to create tables. Using role_table allow users kripa and reena to create tables. CREATE ROLE role_table; GRANT CREATE ANY TABLE

Question : (a) Database Management Systems (DBMS) is the foundation of business intelligence. Explain the following concepts related to DBMS: (i) Entity Relationship Diagr

4. Describe three ways to handle missing field values

Explain the challenges before an E-business management.


Define hot swapping? Hot swapping permits the removal of faulty disks and changes it by new ones without turning power off. Hot swapping decreases the mean time to repair.

Example : Create a sequence named SEQSS that starts at 105, has a step of 1 and can take maximum value as 2000.  CREATE SEQUENCE SEQSS START WITH 105 INCREMENT BY 1 MAX VA

.#question. Discuss the problem which may arise during concurrency control and recovery in distributed database which are not encountered in controlized database environment.

A step-wise distributed database design methodology Following is a step-wise methodology for distributed database design. (1) Examine the nature of distribution. Find out wh

Define the concept of aggregation.  Give two examples where this concept is useful. Ans: Aggregation transforms a relationship among the objects into a higher-level object. A