0% found this document useful (0 votes)
113 views5 pages

SERIALIZABILITY

The serial schedule executes transactions one at a time sequentially. A serializable schedule maintains consistency while allowing some level of concurrency between transactions. To be serializable, a non-serial schedule must have the same result as some serial schedule and meet criteria for conflict serializability or view serializability. Conflict serializability involves swapping non-conflicting operations, while view serializability requires equivalence to a serial schedule based on reads and writes.

Uploaded by

Malvika Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views5 pages

SERIALIZABILITY

The serial schedule executes transactions one at a time sequentially. A serializable schedule maintains consistency while allowing some level of concurrency between transactions. To be serializable, a non-serial schedule must have the same result as some serial schedule and meet criteria for conflict serializability or view serializability. Conflict serializability involves swapping non-conflicting operations, while view serializability requires equivalence to a serial schedule based on reads and writes.

Uploaded by

Malvika Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

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.

Serializable schedule

o The serializability of schedules is used to find non-serial schedules that allow the
transaction to execute concurrently without interfering with one another.
o A non-serial schedule will be serializable if its result is equal to the result of its
transactions executed serially.

SERIALIZABILITY: -
 Some non-serial schedules may lead to inconsistency of the database.
 Serializability is a concept that helps to identify which non-serial schedules are
correct and will maintain the consistency of the database.

2.3.1 SERIALIZABLE SCHEDULES


 If a given non-serial schedule of ‘n’ transactions is equivalent to some serial schedule
of ‘n’ transactions, then it is called as a serializable schedule.

Characteristics-
Serializable schedules behave exactly same as serial schedules.
Thus, serializable schedules are always-
 Consistent
 Recoverable
 Cascadeless (Cascadeless schedule allows only committed read operations.)
a transaction is not allowed to read a data item until the last transaction that has
written it is committed or aborted
 Strict

Serial Schedules Vs Serializable Schedules

Throughput: a number of transactions per second


Types of Serializability: -
Serializability is mainly of two types-
1. Conflict Serializability
2. View Serializability
2.3.1.1 CONFLICT SERIALIZABILITY: -
Conflict Serializable: A schedule is called conflict serializable if it can be transformed into
a serial schedule by swapping non-conflicting operations.

Conflicting operations: Two operations are said to be conflicting if all conditions satisfy: 


 They belong to different transactions
 They operate on the same data item
 At Least one of them is a write operation

Example-
Consider the following schedule-

In this schedule,
 W1 (A) and R2 (A) are called as conflicting operations.
 This is because all the above conditions hold true for them.

 Conflicting operations pair (R 1(A), W2(A)) because they belong to two different


transactions on same data item A and one of them is write operation.
 Similarly, (W1(A), W2(A)) and (W1(A), R2(A)) pairs are also conflicting.
 On the other hand, (R 1(A), W2(B)) pair is non-conflicting because they operate on
different data item.
 Similarly, ((W1(A), W2(B)) pair is non-conflicting.

2.3.1.2 VIEW SERIALIZABILITY: -


View serializability  is a concept that is used to compute whether schedules are View-
Serializable or not. A schedule is said to be View-Serializable if it is view equivalent to
a Serial Schedule.
View Equivalent Schedules-
 Consider two schedules S1 and S2 each consisting of two transactions T1 and T2.
 Schedules S1 and S2 are called view equivalent if the following three conditions hold
true for them-

Condition-01:
 For each data item X, if transaction Ti reads X from the database initially in schedule
S1, then in schedule S2 also, Ti must perform the initial read of X from the database.
Condition-02:
 If transaction Ti reads a data item that has been updated by the transaction T j in
schedule S1, then in schedule S2 also, transaction Ti must read the same data item that
has been updated by the transaction Tj.
Condition-03:
 For each data item X, if X has been updated at last by transaction Ti in schedule S1,
then in schedule S2 also, X must be updated at last by transaction Ti.

Checking Whether a Schedule is View Serializable or Not-


Method-01:
 Check whether the given schedule is conflict serializable or not.
 If the given schedule is conflict serializable, then it is surely view serializable. Stop
and report your answer.
 If the given schedule is not conflict serializable, then it may or may not be view
serializable.
Key Points:
 All conflict serializable schedules are view serializable.
 All view serializable schedules may or may not be conflict serializable.
Method-02:
 Check if there exists any blind write operation.
(Writing without reading is called as a blind write).
 If there does not exist any blind write, then the schedule is surely not view
serializable. Stop and report your answer.
 If there any blind write, then the schedule may or may not be view serializable. 
Key Points:
 No blind write means not a view serializable schedule.
Method-03:
1. In this method, try finding a view equivalent serial schedule.
2. Then, draw a graph using those dependencies.
If there exists no cycle in the graph, then the schedule is view serializable otherwise not

You might also like