SlideShare a Scribd company logo
1 of 19
Download to read offline
MCA, MSc(CS), PGDCA
Pratibha Rashmi
 When many people try to make modifications
to a database at any point of time, there
should be a system of controls in place to
ensure that changes made by one do not
adversely affect the other, this is calledadversely affect the other, this is called
concurrency control.
 Concurrency control deals with interleaved
execution of more than one transaction.
 When multiple transactions execute
concurrently in an uncontrolled or
unrestricted manner, then it might lead to
several problems. Such problems are called
as concurrency problems.
concurrency problems
In transaction
Dirty Read Problem
Unrepeatable Read Problem
Phantom Read Problem
Lost Update Problem
The concurrency problems are:-
 Dirty Read Problem
 Unrepeatable Read Problem
 Phantom Read Problem
 Lost Update Problem
 Dirty Read: Reading the data written by an
uncommitted transaction is called as dirty
read.
This read is called as dirty read because-
There is always a chance that the There is always a chance that the
uncommitted transaction might roll back
later.
 Thus, uncommitted transaction might make
other transactions read a value that does not
even exist.
 This leads to inconsistency of the database.
 Dirty read does not lead to inconsistency always.
 It becomes problematic only when the
uncommitted transaction fails and roll backs
later due to some reason.later due to some reason.
 Here,
T1 reads the value of A.
T1 updates the value of A in the buffer.
T2 reads the value of A from the buffer.
T2 writes the updated the value of A.
T2 commits.T2 commits.
T1 fails in later stages and rolls back.
 In this example,
1. T2 reads the dirty value of A written by the
uncommitted transaction T1.
2. T1 fails in later stages and roll backs.
3. Thus, the value that T2 read now stands to be
incorrect.
4. Therefore, database becomes inconsistent.
 This problem occurs when a transaction gets
to read unrepeated i.e. different values of
the same variable in its different read
operations even when it has not updated its
value.value.
 Here,
T1 reads the value of X (= 10 say).
T2 reads the value of X (= 10).
T1 updates the value of X (from 10 to 15 say)
in the buffer.
T2 again reads the value of X (but = 15).
 In this example,
1. T2 gets to read a different value of X in its second
reading.
2. T2 wonders how the value of X got changed
because according to it, it is running in isolation.
 This problem occurs when a transaction
reads some variable from the buffer and
when it reads the same variable later, it finds
that the variable does not exist.
 Here,
T1 reads X.
T2 reads X.
T1 deletes X.
T2 tries reading X but does not find it.T2 tries reading X but does not find it.
 In this example,
1. T2 finds that there does not exist any variable X
when it tries reading X again.
2. T2 wonders who deleted the variable X because
according to it, it is running in isolation.
 This problem occurs when multiple
transactions execute concurrently and
updates from one or more transactions get
lost.
 Here,
T1 reads the value of A (= 10 say).
T2 updates the value to A (= 15 say) in the buffer.
T2 does blind write A = 25 (write without read) in the
buffer.
T2 commits.
When T1 commits, it writes A = 25 in the database.
 In this example, In this example,
1. T1 writes the over written value of X in the database.
2. Thus, update from T1 gets lost.
NOTE-
 This problem occurs whenever there is a write-write conflict.
 In write-write conflict, there are two writes one by each
transaction on the same data item without any read in the
middle.
 To ensure consistency of the database, it is
very important to prevent the occurrence of
above problems.
 Concurrency Control Protocols help to
prevent the occurrence of above problemsprevent the occurrence of above problems
and maintain the consistency of the
database.
 If the transaction is rolled back, all the
database changes made inside the
transaction are ___________
A. made permanent
B. made temporary
C. copied to the logC. copied to the log
D. undone
 In ________ one transaction overwrites the
changes of another transaction.
A. uncommitted read problem
B. lost update problem
C. update lost problem
D. dirty read problem
 In a dirty read problem _________
A. one transaction reads an uncommitted value of another
transaction
B. one transaction reads the committed value for another
transaction
C. one transaction reads another transaction
D. one transaction commits another transaction.
C. one transaction reads another transaction
D. one transaction commits another transaction.
 Isolation of the transactions is ensured by
A. Transaction management
B. Application programmer
C. Concurrency control
D. Recovery management
 Define the term Concurrency Control.
 What is dirty read and phantom read?
 What is inconsistent read problem?
 What is the mean of write- write problem?
Reference: https://www.gatevidyalay.com/, http://beginnersbook.com
Concurrency control

More Related Content

What's hot

Data Link Layer Numericals
Data Link Layer NumericalsData Link Layer Numericals
Data Link Layer NumericalsManisha Keim
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
DATA RATE LIMITS
DATA RATE LIMITSDATA RATE LIMITS
DATA RATE LIMITSChAwais15
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management SystemJanki Shah
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocaltes31
 
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: Ethernet
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: EthernetSYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: Ethernet
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: EthernetArti Parab Academics
 

What's hot (20)

Data Link Layer Numericals
Data Link Layer NumericalsData Link Layer Numericals
Data Link Layer Numericals
 
Chapter23
Chapter23Chapter23
Chapter23
 
Data link layer
Data link layer Data link layer
Data link layer
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Ch21
Ch21Ch21
Ch21
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
 
DATA RATE LIMITS
DATA RATE LIMITSDATA RATE LIMITS
DATA RATE LIMITS
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Unit 4 - Network Layer
Unit 4 - Network LayerUnit 4 - Network Layer
Unit 4 - Network Layer
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
 
Stop-and-Wait ARQ Protocol
Stop-and-Wait ARQ ProtocolStop-and-Wait ARQ Protocol
Stop-and-Wait ARQ Protocol
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
 
Token bus
Token busToken bus
Token bus
 
Chapter 23
Chapter 23Chapter 23
Chapter 23
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
Binary tree
Binary tree Binary tree
Binary tree
 
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: Ethernet
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: EthernetSYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: Ethernet
SYBSC IT COMPUTER NETWORKS UNIT III Wired LANS: Ethernet
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 

Similar to Concurrency control

database1.pptx
database1.pptxdatabase1.pptx
database1.pptxOmarKamil1
 
Svetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbmsNancy Gulati
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYRohit Kumar
 
protocols of concurrency control
protocols of concurrency controlprotocols of concurrency control
protocols of concurrency controlMOHIT DADU
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency ControlDamian T. Gordon
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryZainab Almugbel
 
The dude's guide to database consistency
The dude's guide to database consistencyThe dude's guide to database consistency
The dude's guide to database consistencyTilak Patidar
 
CONCURRENCY CONTOL notes.pdf
CONCURRENCY CONTOL notes.pdfCONCURRENCY CONTOL notes.pdf
CONCURRENCY CONTOL notes.pdfBijayNag1
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processingJafar Nesargi
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingJafar Nesargi
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingJafar Nesargi
 

Similar to Concurrency control (20)

database1.pptx
database1.pptxdatabase1.pptx
database1.pptx
 
Dbms module iii
Dbms module iiiDbms module iii
Dbms module iii
 
Svetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov - Database Transactions
Svetlin Nakov - Database Transactions
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbms
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
 
Dbms
DbmsDbms
Dbms
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
 
protocols of concurrency control
protocols of concurrency controlprotocols of concurrency control
protocols of concurrency control
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
The dude's guide to database consistency
The dude's guide to database consistencyThe dude's guide to database consistency
The dude's guide to database consistency
 
Question answer
Question answerQuestion answer
Question answer
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
 
CONCURRENCY CONTOL notes.pdf
CONCURRENCY CONTOL notes.pdfCONCURRENCY CONTOL notes.pdf
CONCURRENCY CONTOL notes.pdf
 
Unit 5
Unit 5Unit 5
Unit 5
 
dbms sanat ppt.pdf
dbms sanat ppt.pdfdbms sanat ppt.pdf
dbms sanat ppt.pdf
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processing
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 

More from PratibhaRashmiSingh (6)

Transaction
TransactionTransaction
Transaction
 
Schedule in DBMS
Schedule in DBMSSchedule in DBMS
Schedule in DBMS
 
Types of normalization
Types of normalizationTypes of normalization
Types of normalization
 
Normalization
NormalizationNormalization
Normalization
 
Data manipulation language
Data manipulation languageData manipulation language
Data manipulation language
 
Sql
SqlSql
Sql
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Concurrency control

  • 2.  When many people try to make modifications to a database at any point of time, there should be a system of controls in place to ensure that changes made by one do not adversely affect the other, this is calledadversely affect the other, this is called concurrency control.  Concurrency control deals with interleaved execution of more than one transaction.
  • 3.  When multiple transactions execute concurrently in an uncontrolled or unrestricted manner, then it might lead to several problems. Such problems are called as concurrency problems. concurrency problems In transaction Dirty Read Problem Unrepeatable Read Problem Phantom Read Problem Lost Update Problem
  • 4. The concurrency problems are:-  Dirty Read Problem  Unrepeatable Read Problem  Phantom Read Problem  Lost Update Problem
  • 5.  Dirty Read: Reading the data written by an uncommitted transaction is called as dirty read. This read is called as dirty read because- There is always a chance that the There is always a chance that the uncommitted transaction might roll back later.  Thus, uncommitted transaction might make other transactions read a value that does not even exist.  This leads to inconsistency of the database.
  • 6.  Dirty read does not lead to inconsistency always.  It becomes problematic only when the uncommitted transaction fails and roll backs later due to some reason.later due to some reason.
  • 7.
  • 8.  Here, T1 reads the value of A. T1 updates the value of A in the buffer. T2 reads the value of A from the buffer. T2 writes the updated the value of A. T2 commits.T2 commits. T1 fails in later stages and rolls back.  In this example, 1. T2 reads the dirty value of A written by the uncommitted transaction T1. 2. T1 fails in later stages and roll backs. 3. Thus, the value that T2 read now stands to be incorrect. 4. Therefore, database becomes inconsistent.
  • 9.  This problem occurs when a transaction gets to read unrepeated i.e. different values of the same variable in its different read operations even when it has not updated its value.value.
  • 10.  Here, T1 reads the value of X (= 10 say). T2 reads the value of X (= 10). T1 updates the value of X (from 10 to 15 say) in the buffer. T2 again reads the value of X (but = 15).  In this example, 1. T2 gets to read a different value of X in its second reading. 2. T2 wonders how the value of X got changed because according to it, it is running in isolation.
  • 11.  This problem occurs when a transaction reads some variable from the buffer and when it reads the same variable later, it finds that the variable does not exist.
  • 12.  Here, T1 reads X. T2 reads X. T1 deletes X. T2 tries reading X but does not find it.T2 tries reading X but does not find it.  In this example, 1. T2 finds that there does not exist any variable X when it tries reading X again. 2. T2 wonders who deleted the variable X because according to it, it is running in isolation.
  • 13.  This problem occurs when multiple transactions execute concurrently and updates from one or more transactions get lost.
  • 14.  Here, T1 reads the value of A (= 10 say). T2 updates the value to A (= 15 say) in the buffer. T2 does blind write A = 25 (write without read) in the buffer. T2 commits. When T1 commits, it writes A = 25 in the database.  In this example, In this example, 1. T1 writes the over written value of X in the database. 2. Thus, update from T1 gets lost. NOTE-  This problem occurs whenever there is a write-write conflict.  In write-write conflict, there are two writes one by each transaction on the same data item without any read in the middle.
  • 15.  To ensure consistency of the database, it is very important to prevent the occurrence of above problems.  Concurrency Control Protocols help to prevent the occurrence of above problemsprevent the occurrence of above problems and maintain the consistency of the database.
  • 16.  If the transaction is rolled back, all the database changes made inside the transaction are ___________ A. made permanent B. made temporary C. copied to the logC. copied to the log D. undone  In ________ one transaction overwrites the changes of another transaction. A. uncommitted read problem B. lost update problem C. update lost problem D. dirty read problem
  • 17.  In a dirty read problem _________ A. one transaction reads an uncommitted value of another transaction B. one transaction reads the committed value for another transaction C. one transaction reads another transaction D. one transaction commits another transaction. C. one transaction reads another transaction D. one transaction commits another transaction.  Isolation of the transactions is ensured by A. Transaction management B. Application programmer C. Concurrency control D. Recovery management
  • 18.  Define the term Concurrency Control.  What is dirty read and phantom read?  What is inconsistent read problem?  What is the mean of write- write problem? Reference: https://www.gatevidyalay.com/, http://beginnersbook.com