SlideShare a Scribd company logo
1 of 24
 When multiple transactions are being executed by the
operating system in a multiprogramming environment,
there are possibilities that instructions of one transactions
are interleaved with some other transaction.
Schedule :
 A chronological execution sequence of a transaction is called a
schedule.
 A schedule can have many transactions in it, each comprising
of a number of instructions/tasks.
Serial schedule:
 A schedule S is serial if, for every transaction T participating in
the schedule, all the operations of T are executed consecutively
in the schedule.
 Otherwise, the schedule is called non serial schedule.
Serializable schedule:
• Serializable schedules are always considered to be correct
when concurrent transactions are executing.
1. The main difference between the serial schedule and the
serializable schedule is that in serial schedule, no concurrency is
allowed whereas in serializable schedule, concurrency is
allowed.
2. In serial schedule, if there are two transaction executing at the
same time and if no interleaving of operations is permitted, then
there are only two possible outcomes :
 Execute all the operations of transaction T1 (in sequence) followed by all
the operations of transaction T2 (in sequence).
 Execute all the operations of transaction T2 (in sequence) followed by all
the operations of transaction T1 (in sequence).
In Serializable Schedule, if there are two transaction executing at
the same time and if interleaving of operations is allowed, there
will be many possible orders in which the system can execute the
individual operations of the transactions.
3. In serializable schedule, the concurrent execution of schedule
should be equal to any serial schedule so that schedules are
always considered to be correct, when transaction executions
have interleaving of their operations in the schedules.
 Let T1 transfer $50 from A to B, and T2 transfer 10% of the balance
from A to B.
 A serial schedule in which T1 is followed by T2 :
• A serial schedule where T2 is followed by T1
 Let T1 and T2 be the transactions defined previously. The following
schedule is not a serial schedule, but it is equivalent to Schedule 1.
In Schedules 1, 2 and 3, the sum A + B is preserved.
 The following concurrent schedule does not preserve the
value of (A + B ).
When are 2 schedules equivalent?
There are three types of equivalence of schedules :
•Result equivalence
•Conflict equivalence
•View equivalence
Based on the types of equivalence, we define the types of
serializability. There are accordingly three types of serializability
which are:
•Conflict serializable
•View serializable
Result Equivalence :
In results equivalence, the end result of schedules heavily depend
on input of schedules. The final values are calculated from both
schedules (given and serial) and check whether they are equal.
Result Equivalence
NOT RESULT EQUIVALENCE
 Before we discuss conflict equivalence and conflict serializable
schedule, you must know about conflicts.
 What is a conflict?
 A pair of Operations in a schedule such that if their order is
interchanged then the behavior of at least one of the transactions
may change.
 Operations are conflict, if they satisfy all three of the following
conditions :
 They belong to different transactions
 They access the same data item
 At least one of the operation is a write operation.
 Schedules are conflict equivalent if they can be
transformed one into other by a sequence of non
conflicting interchanges adjacent actions.
 A Schedule is conflict serializable if it is conflict equivalent to
any of serial schedule.
Testing for conflict serializability
Method 1 :
 First write the given schedule in a linear way.
 Find the conflict pairs (RW, WR, WW) on same variable by
different transactions.
 Whenever conflict pairs are find, write the dependency relation
like Ti → Tj, if conflict pair is from Ti to Tj. For example,
(W1(A), R2(A)) ⇒ T1 → T2
 Check to see if there is a cycle formed,
 If yes= not conflict serializable
 No= we get a sequence and hence are conflict serializable.
Method 2:
 To test the conflict serializability, we can draw a Graph G = (V,E)
where
V = Vertices = number of transactions
E = Edges = for conflicting pair
Steps :
 Create node for each transaction.
 Find the conflict pairs (RW, WR, WW) on same variable by
different transactions.
 Draw edge from the schedule for each conflict pair such that for
example, W2(B), R1(A) is conflict pair, draw edge from T2 to T1
i.e. T2 must be executed before T1.
 Testing conditions for conflict serializability of schedule
 If precedence graph is cyclic non conflict serializable schedule
 If precedence graph is a acyclic conflict serializable schedule
W2(B)
W2(B)
 Let S and S´ be two schedules with the same set of transactions. S and S´ are
view equivalent if the following three conditions are met, for each data item
Q,
1. If in schedule S, transaction Ti reads the initial value of Q, then in
schedule S’ also transaction Ti must read the initial value of Q.
2. If in schedule S transaction Ti executes read(Q), and that value was
produced by transaction Tj (if any), then in schedule S’ also transaction
Ti must read the value of Q that was produced by the same write(Q)
operation of transaction Tj .
3. The transaction (if any) that performs the final write(Q) operation in
schedule S must also perform the final write(Q) operation in schedule S’.
As can be seen, view equivalence is also based purely on reads and writes alone.
 A schedule S is view serializable if it is view equivalent to a
serial schedule.
 Every conflict serializable schedule is also view serializable.
 Below is a schedule which is view-serializable but not conflict
serializable.
 What serial schedule is above equivalent to?
 Every view serializable schedule that is not conflict serializable
has blind writes.

More Related Content

What's hot

16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control TechniquesRaj vardhan
 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocolsChethanMp7
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbmsNancy Gulati
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMSMegha Patel
 
Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!Ashish K
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityMeghaj Mallick
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization Hafiz faiz
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency controlBinte fatima
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)Ravinder Kamboj
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocolBBDITM LUCKNOW
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 

What's hot (20)

16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control Techniques
 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbms
 
Schedule in DBMS
Schedule in DBMSSchedule in DBMS
Schedule in DBMS
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!
 
Join dependency
Join dependencyJoin dependency
Join dependency
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-ability
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 

Similar to serializability in dbms

Similar to serializability in dbms (20)

20.SCHEDULES.ppt
20.SCHEDULES.ppt20.SCHEDULES.ppt
20.SCHEDULES.ppt
 
Transaction management
Transaction managementTransaction management
Transaction management
 
Unit-IV_transaction.pptx
Unit-IV_transaction.pptxUnit-IV_transaction.pptx
Unit-IV_transaction.pptx
 
Ch15 3717
Ch15 3717Ch15 3717
Ch15 3717
 
Ch15 3717
Ch15 3717Ch15 3717
Ch15 3717
 
Chapter17
Chapter17Chapter17
Chapter17
 
Transaction and serializability
Transaction and serializabilityTransaction and serializability
Transaction and serializability
 
Dbms seminar
Dbms seminarDbms seminar
Dbms seminar
 
Concurrent Transactions.ppt
Concurrent Transactions.pptConcurrent Transactions.ppt
Concurrent Transactions.ppt
 
UNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdf
UNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdfUNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdf
UNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdf
 
unit06-dbms-new.ppt
unit06-dbms-new.pptunit06-dbms-new.ppt
unit06-dbms-new.ppt
 
Unit 5 - PPT.pdf DBMS SRM university chennai
Unit 5 - PPT.pdf DBMS SRM university chennaiUnit 5 - PPT.pdf DBMS SRM university chennai
Unit 5 - PPT.pdf DBMS SRM university chennai
 
Ch15
Ch15Ch15
Ch15
 
Transactions.pptx
Transactions.pptxTransactions.pptx
Transactions.pptx
 
concurrencycontrol_databasemanagement_system
concurrencycontrol_databasemanagement_systemconcurrencycontrol_databasemanagement_system
concurrencycontrol_databasemanagement_system
 
Question answer
Question answerQuestion answer
Question answer
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
 
dbms sanat ppt.pdf
dbms sanat ppt.pdfdbms sanat ppt.pdf
dbms sanat ppt.pdf
 
Concurrency control and Serializability
Concurrency control and SerializabilityConcurrency control and Serializability
Concurrency control and Serializability
 

More from Saranya Natarajan

More from Saranya Natarajan (9)

cns unit 1.pptx
cns unit 1.pptxcns unit 1.pptx
cns unit 1.pptx
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
mutidimensional database
mutidimensional databasemutidimensional database
mutidimensional database
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
embedded-static-&dynamic
embedded-static-&dynamicembedded-static-&dynamic
embedded-static-&dynamic
 
Query-porcessing-& Query optimization
Query-porcessing-& Query optimizationQuery-porcessing-& Query optimization
Query-porcessing-& Query optimization
 
concurrency-control
concurrency-controlconcurrency-control
concurrency-control
 
deadlock
deadlockdeadlock
deadlock
 

Recently uploaded

Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 

Recently uploaded (20)

Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 

serializability in dbms

  • 1.
  • 2.  When multiple transactions are being executed by the operating system in a multiprogramming environment, there are possibilities that instructions of one transactions are interleaved with some other transaction.
  • 3. Schedule :  A chronological execution sequence of a transaction is called a schedule.  A schedule can have many transactions in it, each comprising of a number of instructions/tasks. Serial schedule:  A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T are executed consecutively in the schedule.  Otherwise, the schedule is called non serial schedule. Serializable schedule: • Serializable schedules are always considered to be correct when concurrent transactions are executing.
  • 4. 1. The main difference between the serial schedule and the serializable schedule is that in serial schedule, no concurrency is allowed whereas in serializable schedule, concurrency is allowed. 2. In serial schedule, if there are two transaction executing at the same time and if no interleaving of operations is permitted, then there are only two possible outcomes :  Execute all the operations of transaction T1 (in sequence) followed by all the operations of transaction T2 (in sequence).  Execute all the operations of transaction T2 (in sequence) followed by all the operations of transaction T1 (in sequence). In Serializable Schedule, if there are two transaction executing at the same time and if interleaving of operations is allowed, there will be many possible orders in which the system can execute the individual operations of the transactions.
  • 5. 3. In serializable schedule, the concurrent execution of schedule should be equal to any serial schedule so that schedules are always considered to be correct, when transaction executions have interleaving of their operations in the schedules.
  • 6.  Let T1 transfer $50 from A to B, and T2 transfer 10% of the balance from A to B.  A serial schedule in which T1 is followed by T2 :
  • 7. • A serial schedule where T2 is followed by T1
  • 8.  Let T1 and T2 be the transactions defined previously. The following schedule is not a serial schedule, but it is equivalent to Schedule 1. In Schedules 1, 2 and 3, the sum A + B is preserved.
  • 9.  The following concurrent schedule does not preserve the value of (A + B ).
  • 10. When are 2 schedules equivalent? There are three types of equivalence of schedules : •Result equivalence •Conflict equivalence •View equivalence Based on the types of equivalence, we define the types of serializability. There are accordingly three types of serializability which are: •Conflict serializable •View serializable Result Equivalence : In results equivalence, the end result of schedules heavily depend on input of schedules. The final values are calculated from both schedules (given and serial) and check whether they are equal.
  • 12.  Before we discuss conflict equivalence and conflict serializable schedule, you must know about conflicts.  What is a conflict?  A pair of Operations in a schedule such that if their order is interchanged then the behavior of at least one of the transactions may change.  Operations are conflict, if they satisfy all three of the following conditions :  They belong to different transactions  They access the same data item  At least one of the operation is a write operation.
  • 13.
  • 14.
  • 15.  Schedules are conflict equivalent if they can be transformed one into other by a sequence of non conflicting interchanges adjacent actions.
  • 16.
  • 17.  A Schedule is conflict serializable if it is conflict equivalent to any of serial schedule. Testing for conflict serializability Method 1 :  First write the given schedule in a linear way.  Find the conflict pairs (RW, WR, WW) on same variable by different transactions.  Whenever conflict pairs are find, write the dependency relation like Ti → Tj, if conflict pair is from Ti to Tj. For example, (W1(A), R2(A)) ⇒ T1 → T2  Check to see if there is a cycle formed,  If yes= not conflict serializable  No= we get a sequence and hence are conflict serializable.
  • 18.
  • 19.
  • 20. Method 2:  To test the conflict serializability, we can draw a Graph G = (V,E) where V = Vertices = number of transactions E = Edges = for conflicting pair Steps :  Create node for each transaction.  Find the conflict pairs (RW, WR, WW) on same variable by different transactions.  Draw edge from the schedule for each conflict pair such that for example, W2(B), R1(A) is conflict pair, draw edge from T2 to T1 i.e. T2 must be executed before T1.  Testing conditions for conflict serializability of schedule  If precedence graph is cyclic non conflict serializable schedule  If precedence graph is a acyclic conflict serializable schedule
  • 21. W2(B)
  • 22. W2(B)
  • 23.  Let S and S´ be two schedules with the same set of transactions. S and S´ are view equivalent if the following three conditions are met, for each data item Q, 1. If in schedule S, transaction Ti reads the initial value of Q, then in schedule S’ also transaction Ti must read the initial value of Q. 2. If in schedule S transaction Ti executes read(Q), and that value was produced by transaction Tj (if any), then in schedule S’ also transaction Ti must read the value of Q that was produced by the same write(Q) operation of transaction Tj . 3. The transaction (if any) that performs the final write(Q) operation in schedule S must also perform the final write(Q) operation in schedule S’. As can be seen, view equivalence is also based purely on reads and writes alone.
  • 24.  A schedule S is view serializable if it is view equivalent to a serial schedule.  Every conflict serializable schedule is also view serializable.  Below is a schedule which is view-serializable but not conflict serializable.  What serial schedule is above equivalent to?  Every view serializable schedule that is not conflict serializable has blind writes.