A non-serial schedule of n number of transactions is said to be a serializable schedule if it is equivalent to the serial schedule of those n transactions. A serial schedule doesn’t allow concurrency, only one transaction executes at a time and the other starts when the already running transaction finished.
Serializability is mainly of two types-
1.Conflict Serializability
2.View Serializability
Conflict Serializability-
If a given non-serial schedule can be converted into a serial schedule by swapping its non-conflicting operations, then it is called as a conflict serializable schedule.
Two operations are called as conflicting operations if all the following conditions hold true for them-
- Both the operations belong to different transactions
- Both the operations are on the same data item
- At least one of the two operations is a write operation
View Serializability- A Schedule is called view serializable if it is view equal to a serial schedule (no overlapping transactions).
Two schedules S1 and S2 are said to be view equal if the below conditions are satisfied :
1) Initial Read
If a transaction T1 reading data item A from the initial database in S1 then in S2 also T1 should read A from the initial database.
Transaction T2 is reading A from the initial database.
2) Updated Read
If Ti is reading A which is updated by Tj in S1 then in S2 also Ti should read A which is updated by Tj.
3) Final Write operation
0 Comments
Doubts? Please let our team know So that we can serve you better.