SlideShare a Scribd company logo
2
Most read
10
Most read
14
Most read
Serializability
Serializability is a concept that helps us to check which schedules are serializable.
why we need this?
A serializable schedule is the one that always leaves the database in consistent
state.
Types of Schedules in DBMS
• Serial schedules
• Non-Serial. schedules
A transaction is executed completely before starting the execution of
another transaction.
The serial schedule where one transaction must wait for another to complete
all its operation
This type of execution of transaction is also known as non-interleaved execution.
Here R refers to the read operation and W refers to the write operation.
In this example, the transaction T2 does not start execution until the transaction
T1 is finished.
T1 T2
---- ----
R(A)
R(B)
W(A)
commit R(B)
R(A)
W(B)
commit
A serial schedule
doesn’t allow
concurrency, only one
transaction executes at
a time and the other
starts when the already
running transaction
finished.
In the non-serial schedule, the other transaction proceeds without waiting for
the previous transaction to complete
A type of Scheduling where the operations of multiple transactions are
interleaved.
When multiple transactions are running concurrently then there is a possibility
that the database may be left in an inconsistent state.
Non-serial schedule may leave the database in inconsistent state so we need to
check these non-serial schedules for the Serializability.
The Non-Serial Schedule can be divided further into
1. Serializable and
2. Non-Serializable.
A serializable schedule is the one that always leaves the database in consistent
state.
This is used to maintain the consistency of the database.
It is mainly used in the Non-Serial scheduling to verify whether the scheduling
will lead to any inconsistency or not.
A serial schedule is always a serializable schedule because in serial schedule, a
transaction only starts when the other transaction finished execution.
However a non-serial schedule needs to be checked for Serializability.
If a schedule of concurrent ‘n' transactions can be converted into an equivalent
serial schedule.
Then we can say that the schedule is serializable.
And this property is known as serializability.
(a) If two transactions only read a data item, they do not conflict and order is not
important.
(b) If two transactions either read or write separate data items, they do not
conflict and order is not important.
(c) If one transaction writes a data item and another reads or writes same data
item, order of execution is important.
Serializability is the concept in a transaction that helps to identify which non-
serial schedule is correct and will maintain the database consistency.
In above precedence graph of schedule S, contains two vertices T1 and T2, and a single edge T1? T2,
because all the instructions of T1 are executed before the first instruction of T2 is executed.
If a precedence graph for any schedule contains a cycle, then that schedule is non-serializable.
If the precedence graph has no cycle, then the schedule is serializable.
So, schedule S is serializable (i.e., serial schedule) because the precedence graph has no cycle.
In above precedence graph of schedule S1, contains two vertices T1 and T2, and edges T1? T2 and T2?
T1. In this Schedule S1, operations of T1 and T2 transaction are present in an interleaved manner.
The precedence graph contains a cycle, that’s why schedule S1 is non-serializable.
A type of serializability that can be used to check whether the given schedule is
view serializable or not.
A schedule called as a view serializable if it is view equivalent to a serial schedule.
View Equivalent
Two schedules S1 and S2 are said to be view equivalent if both satisfy the
following conditions:
1. Initial read
An initial read of the data item in both the schedule must be same.
For example, lets two schedule S1 and S2.
If transaction T1 reads the data item A in schedule S1, then in schedule S2
transaction T1 also reads A.
the first read operation on a data item,
2. Final Write:
Final write operations on each data item must match in both the schedules.
For example, a data item X is last written by Transaction T1 in schedule S1 then in
S2, the last write operation on X should be performed by the transaction T1.
3. Update Read:
If in schedule S1, the transaction T1 is reading a data item updated by T2 then in
schedule S2, T1 should read the value after the write operation of T2 on same
data item.
As we know that in Serial schedule a
transaction only starts when the current
running transaction is finished.
If we can prove that the given schedule
is View Equivalent to its serial schedule
then the given schedule is called view
Serializable.
one of the type of Serializability, which can be used to check whether a non-
serial schedule is conflict serializable or not.
A schedule is called conflict serializable if we can convert it into a serial schedule
after swapping its non-conflicting operations.
Conflicting operations
Two operations are said to be in conflict, if they satisfy all the following three
conditions:
1. Both the operations should belong to different transactions.
2. Both the operations are working on same data item.
3. At least one of the operation is a write operation.
Example 1:
Operation W(X) of transaction T1 and
operation R(X) of transaction T2 are conflicting operations
because they satisfy all the three conditions mentioned above.
They belong to different transactions,
they are working on same data item X,
one of the operation in write operation.
Example 2:
Operations W(X) of T1 and
W(Y) of T2 are non-conflicting operations
because both the write operations are not working on same data item so these operations
don’t satisfy the second condition.
• R3(X) and W2(X) [ T3 -> T2 ]
• W1(Y) and R3(Y) [ T1 -> T3 ]
• W1(Y) and W2(Y) [ T1 -> T2 ]
• R3(Y) and W2(Y) [ T3 -> T2 ]
• Constructing the precedence graph, we see there
are no cycles in the graph. Therefore, the
schedule is Conflict Serializable.
Two operations are said to be conflicting if
the belong to different transaction, operate
on same data and at least one of them is a
write operation.

More Related Content

PPTX
serializability in dbms
PPTX
Unit 4 dbms
PPT
16. Concurrency Control in DBMS
PPTX
Transaction Processing in DBMS.pptx
PDF
Schedule in DBMS
PPT
Transactions in dbms
PPTX
Concurrency control
PPT
Transaction
serializability in dbms
Unit 4 dbms
16. Concurrency Control in DBMS
Transaction Processing in DBMS.pptx
Schedule in DBMS
Transactions in dbms
Concurrency control
Transaction

What's hot (20)

PPTX
Input-Buffering
PPTX
Performance analysis(Time & Space Complexity)
PPTX
2 phase locking protocol DBMS
PPTX
Acid properties
PDF
Algorithms Lecture 1: Introduction to Algorithms
PPTX
Introduction to data structure ppt
PPTX
Deadlock Prevention
PPTX
Lock based protocols
PPTX
Data Structures : hashing (1)
PPT
Complexity of Algorithm
PPT
1. Introduction to DBMS
PPTX
Webinar : P, NP, NP-Hard , NP - Complete problems
PPT
15. Transactions in DBMS
PPTX
Transaction management DBMS
PDF
Production System in AI
PPT
Coupling and cohesion
PPTX
Syntax Analysis in Compiler Design
PDF
Daa notes 1
PPTX
Type checking compiler construction Chapter #6
PPTX
Functional dependencies and normalization
Input-Buffering
Performance analysis(Time & Space Complexity)
2 phase locking protocol DBMS
Acid properties
Algorithms Lecture 1: Introduction to Algorithms
Introduction to data structure ppt
Deadlock Prevention
Lock based protocols
Data Structures : hashing (1)
Complexity of Algorithm
1. Introduction to DBMS
Webinar : P, NP, NP-Hard , NP - Complete problems
15. Transactions in DBMS
Transaction management DBMS
Production System in AI
Coupling and cohesion
Syntax Analysis in Compiler Design
Daa notes 1
Type checking compiler construction Chapter #6
Functional dependencies and normalization
Ad

Similar to Serializability (20)

PPT
20.SCHEDULES.ppt
PDF
Dbms seminar
PDF
UNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdf
PPT
Concurrent Transactions.ppt
PPTX
Unit-IV_transaction.pptx
PPTX
Question answer
PPT
Transaction unit1 topic 2
PPTX
7. CSEN3101-MIV-TransactionProcessing-SolvedProblems-06.11.2023.pptx
PPTX
Transactions.pptx
PPT
PPT
Ch15 3717
PDF
dbms sanat ppt.pdf
PPTX
DBMS_Unit-4 data bas management (1).pptx
PPTX
Adbms 35 recoverability and serializability
PPT
ddededeeddeededeeeeeeeeeeeeeeeeeeeeeeeeeeee
PDF
DBMS 4.pdf
PPT
Chapter17
PPTX
Dangling Tuples-Database management system
PPTX
Transaction and serializability
PPTX
wheguyewfwufwuyvweyfgse6fgsyfs6yfsdtyfsy6udfgsyu
20.SCHEDULES.ppt
Dbms seminar
UNIT 2- TRANSACTION CONCEPTS AND CONCURRENCY CONCEPTS (1).pdf
Concurrent Transactions.ppt
Unit-IV_transaction.pptx
Question answer
Transaction unit1 topic 2
7. CSEN3101-MIV-TransactionProcessing-SolvedProblems-06.11.2023.pptx
Transactions.pptx
Ch15 3717
dbms sanat ppt.pdf
DBMS_Unit-4 data bas management (1).pptx
Adbms 35 recoverability and serializability
ddededeeddeededeeeeeeeeeeeeeeeeeeeeeeeeeeee
DBMS 4.pdf
Chapter17
Dangling Tuples-Database management system
Transaction and serializability
wheguyewfwufwuyvweyfgse6fgsyfs6yfsdtyfsy6udfgsyu
Ad

More from Pyingkodi Maran (20)

PDF
Defining Identity as a Service (IDaaS) in Cloud Computing
PDF
Data Science Normal Distribution Z-Score
PDF
Data Science Introduction and Process in Data Science
PDF
Database Manipulation with MYSQL Commands
PDF
Jquery Tutorials for designing Dynamic Web Site
PDF
Working with AWS Relational Database Instances
DOC
Health Monitoring System using IoT.doc
PPT
IoT Industry Adaptation of AI.ppt
PPT
IoT_Testing.ppt
PDF
Azure Devops
PDF
Creation of Web Portal using DURPAL
PDF
AWS Relational Database Instance
PDF
AWS S3 Buckets
PDF
Creation of AWS Instance in Cloud Platform
PDF
Amazon Web Service.pdf
PDF
Cloud Security
PDF
Cloud Computing Introduction
PDF
Supervised Machine Learning Algorithm
PDF
Unsupervised Learning in Machine Learning
PDF
Feature Engineering in Machine Learning
Defining Identity as a Service (IDaaS) in Cloud Computing
Data Science Normal Distribution Z-Score
Data Science Introduction and Process in Data Science
Database Manipulation with MYSQL Commands
Jquery Tutorials for designing Dynamic Web Site
Working with AWS Relational Database Instances
Health Monitoring System using IoT.doc
IoT Industry Adaptation of AI.ppt
IoT_Testing.ppt
Azure Devops
Creation of Web Portal using DURPAL
AWS Relational Database Instance
AWS S3 Buckets
Creation of AWS Instance in Cloud Platform
Amazon Web Service.pdf
Cloud Security
Cloud Computing Introduction
Supervised Machine Learning Algorithm
Unsupervised Learning in Machine Learning
Feature Engineering in Machine Learning

Recently uploaded (20)

PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
PPT on Performance Review to get promotions
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Mechanical Engineering MATERIALS Selection
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Welding lecture in detail for understanding
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT
Project quality management in manufacturing
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
composite construction of structures.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
Internet of Things (IOT) - A guide to understanding
DOCX
573137875-Attendance-Management-System-original
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPT on Performance Review to get promotions
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mechanical Engineering MATERIALS Selection
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Welding lecture in detail for understanding
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Embodied AI: Ushering in the Next Era of Intelligent Systems
bas. eng. economics group 4 presentation 1.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Project quality management in manufacturing
Structs to JSON How Go Powers REST APIs.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
composite construction of structures.pdf
Geodesy 1.pptx...............................................
Internet of Things (IOT) - A guide to understanding
573137875-Attendance-Management-System-original
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Serializability

  • 2. Serializability is a concept that helps us to check which schedules are serializable. why we need this? A serializable schedule is the one that always leaves the database in consistent state. Types of Schedules in DBMS • Serial schedules • Non-Serial. schedules A transaction is executed completely before starting the execution of another transaction. The serial schedule where one transaction must wait for another to complete all its operation This type of execution of transaction is also known as non-interleaved execution.
  • 3. Here R refers to the read operation and W refers to the write operation. In this example, the transaction T2 does not start execution until the transaction T1 is finished. T1 T2 ---- ---- R(A) R(B) W(A) commit R(B) R(A) W(B) commit A serial schedule doesn’t allow concurrency, only one transaction executes at a time and the other starts when the already running transaction finished.
  • 4. In the non-serial schedule, the other transaction proceeds without waiting for the previous transaction to complete A type of Scheduling where the operations of multiple transactions are interleaved. When multiple transactions are running concurrently then there is a possibility that the database may be left in an inconsistent state. Non-serial schedule may leave the database in inconsistent state so we need to check these non-serial schedules for the Serializability. The Non-Serial Schedule can be divided further into 1. Serializable and 2. Non-Serializable.
  • 5. A serializable schedule is the one that always leaves the database in consistent state. This is used to maintain the consistency of the database. It is mainly used in the Non-Serial scheduling to verify whether the scheduling will lead to any inconsistency or not. A serial schedule is always a serializable schedule because in serial schedule, a transaction only starts when the other transaction finished execution. However a non-serial schedule needs to be checked for Serializability. If a schedule of concurrent ‘n' transactions can be converted into an equivalent serial schedule. Then we can say that the schedule is serializable. And this property is known as serializability.
  • 6. (a) If two transactions only read a data item, they do not conflict and order is not important. (b) If two transactions either read or write separate data items, they do not conflict and order is not important. (c) If one transaction writes a data item and another reads or writes same data item, order of execution is important. Serializability is the concept in a transaction that helps to identify which non- serial schedule is correct and will maintain the database consistency.
  • 7. In above precedence graph of schedule S, contains two vertices T1 and T2, and a single edge T1? T2, because all the instructions of T1 are executed before the first instruction of T2 is executed. If a precedence graph for any schedule contains a cycle, then that schedule is non-serializable. If the precedence graph has no cycle, then the schedule is serializable. So, schedule S is serializable (i.e., serial schedule) because the precedence graph has no cycle.
  • 8. In above precedence graph of schedule S1, contains two vertices T1 and T2, and edges T1? T2 and T2? T1. In this Schedule S1, operations of T1 and T2 transaction are present in an interleaved manner. The precedence graph contains a cycle, that’s why schedule S1 is non-serializable.
  • 9. A type of serializability that can be used to check whether the given schedule is view serializable or not. A schedule called as a view serializable if it is view equivalent to a serial schedule. View Equivalent Two schedules S1 and S2 are said to be view equivalent if both satisfy the following conditions: 1. Initial read An initial read of the data item in both the schedule must be same. For example, lets two schedule S1 and S2. If transaction T1 reads the data item A in schedule S1, then in schedule S2 transaction T1 also reads A. the first read operation on a data item,
  • 10. 2. Final Write: Final write operations on each data item must match in both the schedules. For example, a data item X is last written by Transaction T1 in schedule S1 then in S2, the last write operation on X should be performed by the transaction T1. 3. Update Read: If in schedule S1, the transaction T1 is reading a data item updated by T2 then in schedule S2, T1 should read the value after the write operation of T2 on same data item.
  • 11. As we know that in Serial schedule a transaction only starts when the current running transaction is finished. If we can prove that the given schedule is View Equivalent to its serial schedule then the given schedule is called view Serializable.
  • 12. one of the type of Serializability, which can be used to check whether a non- serial schedule is conflict serializable or not. A schedule is called conflict serializable if we can convert it into a serial schedule after swapping its non-conflicting operations. Conflicting operations Two operations are said to be in conflict, if they satisfy all the following three conditions: 1. Both the operations should belong to different transactions. 2. Both the operations are working on same data item. 3. At least one of the operation is a write operation.
  • 13. Example 1: Operation W(X) of transaction T1 and operation R(X) of transaction T2 are conflicting operations because they satisfy all the three conditions mentioned above. They belong to different transactions, they are working on same data item X, one of the operation in write operation. Example 2: Operations W(X) of T1 and W(Y) of T2 are non-conflicting operations because both the write operations are not working on same data item so these operations don’t satisfy the second condition.
  • 14. • R3(X) and W2(X) [ T3 -> T2 ] • W1(Y) and R3(Y) [ T1 -> T3 ] • W1(Y) and W2(Y) [ T1 -> T2 ] • R3(Y) and W2(Y) [ T3 -> T2 ] • Constructing the precedence graph, we see there are no cycles in the graph. Therefore, the schedule is Conflict Serializable. Two operations are said to be conflicting if the belong to different transaction, operate on same data and at least one of them is a write operation.