SlideShare a Scribd company logo
2
Most read
6
Most read
13
Most read
“Overview of Concurrency control and recovery
in distributed database”
Presented by : Prashi Jain
Roll No. : MA/25022/18
What is concurrency control
 Concurrency control is the procedure in DBMS for managing simultaneous
operations without conflicting with each another.
 Concurrent access is quite easy if all users are just reading data. There is no way
they can interfere with one another.
 Though for any practical database, would have a mix of reading and WRITE
operations and hence the concurrency is a challenge.
Why use Concurrency method?
 To apply Isolation through mutual exclusion between conflicting transactions.
To resolve read-write and write-write conflict issues
To preserve database consistency through constantly preserving execution
obstructions
The system needs to control the interaction among the concurrent transactions.
This control is achieved using concurrent-control schemes.
Concurrency control helps to ensure serializability
Example
Assume that two people who go to electronic kiosks at the same time to buy a
movie ticket for the same movie and the same show time.
However, there is only one seat left in for the movie show in that particular
theatre. Without concurrency control, it is possible that both moviegoers will
end up purchasing a ticket. However, concurrency control method does not
allow this to happen. Both moviegoers can still access information written in the
movie seating database. But concurrency control only provides a ticket to the
buyer who has completed the transaction process first.
Concurrency Control Protocols
In order to maintain the concurrent access of transactions, two
protocols are introduced :-
1- lock based protocol
2- time stamp based protocol
Lock based protocol
A lock is applied to avoid concurrency problem between two transaction in such a way that
the lock is applied on one transaction and other transaction can access it only when the lock
is released. The lock is applied on write or read operations.
These locks are broadly classified into:-
1- binary locks:- In binary lock data can either be locked or unlocked. It will have only
these two states.
2-Shared/exclusive locks:- data is said to be exclusively locked if for insert / update
/delete. When it is exclusively locked no other transaction can read or write the data.
When a data is read from the database, then its lock is shared i.e.; the data can be read by
other transaction too but it cannot be changed while retrieving the data.
Lock based protocols are of 4 types
 Simplistic Lock Protocol: - This protocol allows all the transaction to get the lock on the data
before insert / update /delete on it. After completing the transaction, it will unlock the data.
 Pre-claiming Protocol: - Pre-claiming lock protocol helps to evaluate operations and create a
list of required data items which are needed to initiate an execution process. In the situation
when all locks are granted, the transaction executes. After that, all locks release when all of its
operations are over.
Two Phase Locking (2PL) Protocol
This locking protocol divides the execution phase of a transaction into three
different parts.
In the first phase, when the transaction begins to execute, it requires permission
for the locks it needs.
The second part is where the transaction obtains all the locks. When a transaction
releases its first lock, the third phase starts.
In this third phase, the transaction cannot demand any new locks. Instead, it only
releases the acquired locks.
Strict Two-Phase Locking Method
Strict-Two phase locking system is almost similar to 2PL. The only difference is
that Strict-2PL never releases a lock after using it. It holds all the locks until the
commit point and releases all the locks at one go when the process is over.
Timestamp-based Protocols
The timestamp-based algorithm uses a timestamp to serialize the execution of concurrent
transactions.
This protocol ensures that every conflicting read and write operations are executed
in timestamp order. The protocol uses the System Time or Logical Count as a Timestamp.
Example:
Suppose there are three transactions T1,T2,T3
T1 has entered the system at time 0010
T2 has entered the system at time 0020
T3 has entered the system at time 0030
Priority will be given to the transaction T1, then transaction T2 then transaction T3.
Recovery
Recovery Control in Distributed Databases. As with
local recovery, distributed database recovery aims to maintain
the atomicity and durability of distributed transactions.
A database must guarantee that all statements in a transaction ,
distributed or non-distributed, either commit or roll back as a
unit.
Recovery methods
Salvation Program – a post-crash process that tries to restore
the DB to a valid state. No recovery data used.
Incremental Dumping – Copies updated files to archival
storage. Performed either after TX completion or regular
intervals.
Audit Trail – Keeps track of a sequence of actions. Useful for
DB restoration to pre-crash state.
Differential Files – separate files records updates requested
for records in a main file.
Backup/Current Version – current version of DB is stored
in currently existing files with present values.
Multiple Copies – multiple identical copies of the DB files
are maintained.
Careful Replacement – Update performed on a copy.
Original is deleted upon commit. Original copy available
after a crash during update.
THANK YOU

More Related Content

What's hot (20)

PPT
16. Concurrency Control in DBMS
koolkampus
 
PPTX
Object relational and extended relational databases
Suhad Jihad
 
PPTX
Distributed dbms architectures
Pooja Dixit
 
PPTX
Active database system
Adeolu Olaniyan
 
PDF
management of distributed transactions
Nilu Desai
 
PPTX
Concurrency Control in Distributed Database.
Meghaj Mallick
 
PPTX
System interconnect architecture
Gagan Kumar
 
PPTX
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
 
PDF
Distributed deadlock
Md. Mahedi Mahfuj
 
PPTX
Query processing in Distributed Database System
Meghaj Mallick
 
PPT
13. Query Processing in DBMS
koolkampus
 
PPT
Distributed document based system
Chetan Selukar
 
PPTX
Object Relational Database Management System(ORDBMS)
Rabin BK
 
PPTX
Transport layer
reshmadayma
 
PPT
Chapter 4 a interprocess communication
AbDul ThaYyal
 
PPTX
Object relational database management system
Saibee Alam
 
PPTX
Concurrency control
Subhasish Pati
 
PDF
Distributed Systems Naming
Ahmed Magdy Ezzeldin, MSc.
 
PDF
Distributed Coordination-Based Systems
Ahmed Magdy Ezzeldin, MSc.
 
PPTX
Database System Architectures
Information Technology
 
16. Concurrency Control in DBMS
koolkampus
 
Object relational and extended relational databases
Suhad Jihad
 
Distributed dbms architectures
Pooja Dixit
 
Active database system
Adeolu Olaniyan
 
management of distributed transactions
Nilu Desai
 
Concurrency Control in Distributed Database.
Meghaj Mallick
 
System interconnect architecture
Gagan Kumar
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
 
Distributed deadlock
Md. Mahedi Mahfuj
 
Query processing in Distributed Database System
Meghaj Mallick
 
13. Query Processing in DBMS
koolkampus
 
Distributed document based system
Chetan Selukar
 
Object Relational Database Management System(ORDBMS)
Rabin BK
 
Transport layer
reshmadayma
 
Chapter 4 a interprocess communication
AbDul ThaYyal
 
Object relational database management system
Saibee Alam
 
Concurrency control
Subhasish Pati
 
Distributed Systems Naming
Ahmed Magdy Ezzeldin, MSc.
 
Distributed Coordination-Based Systems
Ahmed Magdy Ezzeldin, MSc.
 
Database System Architectures
Information Technology
 

Similar to Overview of Concurrency Control & Recovery in Distributed Databases (20)

PPTX
Vani dbms
SangeethaSasi1
 
DOCX
Dbms voc 5 unit
gurjotkawatra
 
PPTX
Transaction management
ArchanaMani2
 
PDF
Advanced Database Chapter 4.pdf shnsbxlajmndm woweosmkl m,xcnkl C NOOxcx xcbnxc
alemunuruhak9
 
PPTX
Concurrency Control in Distributed Systems.pptx
MArshad35
 
PPTX
Concurrency Control
Nishant Munjal
 
PDF
F017213747
IOSR Journals
 
PDF
Design & Development of an Advanced Database Management System Using Multiver...
IOSR Journals
 
PDF
F017213747
IOSR Journals
 
PDF
Concurrency note.pdf
BijayNag1
 
PPT
Concurrency control ms neeti
neeti arora
 
PPT
Concurrency control ms neeti
neeti arora
 
PDF
Process coordination
Sweta Kumari Barnwal
 
PDF
chp13.pdf
cscmsai54
 
PPTX
Sql server concurrency
Mahabubur Rahaman
 
PPTX
Concurrent control
Felix Makundi
 
PPTX
DBMS Pravin concurrency control technique.pptx
PravinBhargav1
 
PPTX
DBMS Presentation.pptx
PravinBhargav1
 
PPTX
Distributed concurrency control
Binte fatima
 
PPTX
Transaction management
janani thirupathi
 
Vani dbms
SangeethaSasi1
 
Dbms voc 5 unit
gurjotkawatra
 
Transaction management
ArchanaMani2
 
Advanced Database Chapter 4.pdf shnsbxlajmndm woweosmkl m,xcnkl C NOOxcx xcbnxc
alemunuruhak9
 
Concurrency Control in Distributed Systems.pptx
MArshad35
 
Concurrency Control
Nishant Munjal
 
F017213747
IOSR Journals
 
Design & Development of an Advanced Database Management System Using Multiver...
IOSR Journals
 
F017213747
IOSR Journals
 
Concurrency note.pdf
BijayNag1
 
Concurrency control ms neeti
neeti arora
 
Concurrency control ms neeti
neeti arora
 
Process coordination
Sweta Kumari Barnwal
 
chp13.pdf
cscmsai54
 
Sql server concurrency
Mahabubur Rahaman
 
Concurrent control
Felix Makundi
 
DBMS Pravin concurrency control technique.pptx
PravinBhargav1
 
DBMS Presentation.pptx
PravinBhargav1
 
Distributed concurrency control
Binte fatima
 
Transaction management
janani thirupathi
 
Ad

More from Meghaj Mallick (20)

PPT
24 partial-orderings
Meghaj Mallick
 
PPTX
PORTFOLIO BY USING HTML & CSS
Meghaj Mallick
 
PPTX
Introduction to Software Testing
Meghaj Mallick
 
PPTX
Introduction to System Programming
Meghaj Mallick
 
PPTX
MACRO ASSEBLER
Meghaj Mallick
 
PPTX
Icons, Image & Multimedia
Meghaj Mallick
 
PPTX
Project Tracking & SPC
Meghaj Mallick
 
PPTX
Peephole Optimization
Meghaj Mallick
 
PPTX
Routing in MANET
Meghaj Mallick
 
PPTX
Macro assembler
Meghaj Mallick
 
PPTX
Architecture and security in Vanet PPT
Meghaj Mallick
 
PPTX
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
PPTX
Text Mining of Twitter in Data Mining
Meghaj Mallick
 
PPTX
DFS & BFS in Computer Algorithm
Meghaj Mallick
 
PPTX
Software Development Method
Meghaj Mallick
 
PPTX
Secant method in Numerical & Statistical Method
Meghaj Mallick
 
PPTX
Motivation in Organization
Meghaj Mallick
 
PPTX
Communication Skill
Meghaj Mallick
 
PPT
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
PPTX
Hashing In Data Structure
Meghaj Mallick
 
24 partial-orderings
Meghaj Mallick
 
PORTFOLIO BY USING HTML & CSS
Meghaj Mallick
 
Introduction to Software Testing
Meghaj Mallick
 
Introduction to System Programming
Meghaj Mallick
 
MACRO ASSEBLER
Meghaj Mallick
 
Icons, Image & Multimedia
Meghaj Mallick
 
Project Tracking & SPC
Meghaj Mallick
 
Peephole Optimization
Meghaj Mallick
 
Routing in MANET
Meghaj Mallick
 
Macro assembler
Meghaj Mallick
 
Architecture and security in Vanet PPT
Meghaj Mallick
 
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
Text Mining of Twitter in Data Mining
Meghaj Mallick
 
DFS & BFS in Computer Algorithm
Meghaj Mallick
 
Software Development Method
Meghaj Mallick
 
Secant method in Numerical & Statistical Method
Meghaj Mallick
 
Motivation in Organization
Meghaj Mallick
 
Communication Skill
Meghaj Mallick
 
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
Hashing In Data Structure
Meghaj Mallick
 
Ad

Recently uploaded (16)

PPTX
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
PPTX
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
PPTX
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PDF
The Family Secret (essence of loveliness)
Favour Biodun
 
PPTX
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PDF
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PPTX
some leadership theories MBA management.pptx
rkseo19
 
PDF
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
PPTX
Great-Books. Powerpoint presentation. files
tamayocrisgie
 
PPTX
2025-07-06 Abraham 06 (shared slides).pptx
Dale Wells
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PPTX
presentation on legal and regulatory action
raoharsh4122001
 
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
Pastor Bob Stewart Acts 21 07 09 2025.pptx
FamilyWorshipCenterD
 
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
Cloud Computing Service Availability.pdf
chakrirocky1
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
The Family Secret (essence of loveliness)
Favour Biodun
 
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
The Impact of Game Live Streaming on In-Game Purchases of Chinese Young Game ...
Shibaura Institute of Technology
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
some leadership theories MBA management.pptx
rkseo19
 
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
Great-Books. Powerpoint presentation. files
tamayocrisgie
 
2025-07-06 Abraham 06 (shared slides).pptx
Dale Wells
 
AI presentation for everyone in every fields
dodinhkhai1
 
presentation on legal and regulatory action
raoharsh4122001
 

Overview of Concurrency Control & Recovery in Distributed Databases

  • 1. “Overview of Concurrency control and recovery in distributed database” Presented by : Prashi Jain Roll No. : MA/25022/18
  • 2. What is concurrency control  Concurrency control is the procedure in DBMS for managing simultaneous operations without conflicting with each another.  Concurrent access is quite easy if all users are just reading data. There is no way they can interfere with one another.  Though for any practical database, would have a mix of reading and WRITE operations and hence the concurrency is a challenge.
  • 3. Why use Concurrency method?  To apply Isolation through mutual exclusion between conflicting transactions. To resolve read-write and write-write conflict issues To preserve database consistency through constantly preserving execution obstructions The system needs to control the interaction among the concurrent transactions. This control is achieved using concurrent-control schemes. Concurrency control helps to ensure serializability
  • 4. Example Assume that two people who go to electronic kiosks at the same time to buy a movie ticket for the same movie and the same show time. However, there is only one seat left in for the movie show in that particular theatre. Without concurrency control, it is possible that both moviegoers will end up purchasing a ticket. However, concurrency control method does not allow this to happen. Both moviegoers can still access information written in the movie seating database. But concurrency control only provides a ticket to the buyer who has completed the transaction process first.
  • 5. Concurrency Control Protocols In order to maintain the concurrent access of transactions, two protocols are introduced :- 1- lock based protocol 2- time stamp based protocol
  • 6. Lock based protocol A lock is applied to avoid concurrency problem between two transaction in such a way that the lock is applied on one transaction and other transaction can access it only when the lock is released. The lock is applied on write or read operations. These locks are broadly classified into:- 1- binary locks:- In binary lock data can either be locked or unlocked. It will have only these two states. 2-Shared/exclusive locks:- data is said to be exclusively locked if for insert / update /delete. When it is exclusively locked no other transaction can read or write the data. When a data is read from the database, then its lock is shared i.e.; the data can be read by other transaction too but it cannot be changed while retrieving the data.
  • 7. Lock based protocols are of 4 types  Simplistic Lock Protocol: - This protocol allows all the transaction to get the lock on the data before insert / update /delete on it. After completing the transaction, it will unlock the data.  Pre-claiming Protocol: - Pre-claiming lock protocol helps to evaluate operations and create a list of required data items which are needed to initiate an execution process. In the situation when all locks are granted, the transaction executes. After that, all locks release when all of its operations are over.
  • 8. Two Phase Locking (2PL) Protocol This locking protocol divides the execution phase of a transaction into three different parts. In the first phase, when the transaction begins to execute, it requires permission for the locks it needs. The second part is where the transaction obtains all the locks. When a transaction releases its first lock, the third phase starts. In this third phase, the transaction cannot demand any new locks. Instead, it only releases the acquired locks.
  • 9. Strict Two-Phase Locking Method Strict-Two phase locking system is almost similar to 2PL. The only difference is that Strict-2PL never releases a lock after using it. It holds all the locks until the commit point and releases all the locks at one go when the process is over.
  • 10. Timestamp-based Protocols The timestamp-based algorithm uses a timestamp to serialize the execution of concurrent transactions. This protocol ensures that every conflicting read and write operations are executed in timestamp order. The protocol uses the System Time or Logical Count as a Timestamp. Example: Suppose there are three transactions T1,T2,T3 T1 has entered the system at time 0010 T2 has entered the system at time 0020 T3 has entered the system at time 0030 Priority will be given to the transaction T1, then transaction T2 then transaction T3.
  • 11. Recovery Recovery Control in Distributed Databases. As with local recovery, distributed database recovery aims to maintain the atomicity and durability of distributed transactions. A database must guarantee that all statements in a transaction , distributed or non-distributed, either commit or roll back as a unit.
  • 12. Recovery methods Salvation Program – a post-crash process that tries to restore the DB to a valid state. No recovery data used. Incremental Dumping – Copies updated files to archival storage. Performed either after TX completion or regular intervals. Audit Trail – Keeps track of a sequence of actions. Useful for DB restoration to pre-crash state.
  • 13. Differential Files – separate files records updates requested for records in a main file. Backup/Current Version – current version of DB is stored in currently existing files with present values. Multiple Copies – multiple identical copies of the DB files are maintained. Careful Replacement – Update performed on a copy. Original is deleted upon commit. Original copy available after a crash during update.