SlideShare a Scribd company logo
1 of 11
VALIDATION BASED PROTOCOL AND MULTIPLE
GRANULARITY
VALIDATION BASED PROTOCOL
PRESENTED BY: KASHISH HORA
SAMYAK JAIN
submitted to ā€“ Anju Sharma Mam
INTRODUCTION
ļµ Validation Based Protocol is also called Optimistic Concurrency Control Technique. This protocol is used in
DBMS (Database Management System) for avoiding concurrency in transactions.
ļµ It is called optimistic because of the assumption it makes, i.e. very less interference occurs, therefore,
there is no need for checking while the transaction is executed.
ļµ In this technique, no checking is done while the transaction is been executed. Until the transaction end is
reached updates in the transaction are not applied directly to the database. All updates are applied to local
copies of data items kept for the transaction.
ļµ At the end of transaction execution, while execution of the transaction, a validation phase checks whether
any of transaction updates violate serializability. If there is no violation of serializability the transaction is
committed and the database is updated; or else, the transaction is updated and then restarted.
ļµ Optimistic Concurrency Control is a three-phase protocol. The three phases for validation based protocol:
ā€¢READ PHASE:- In this phase Ti reads all data & store them in temporary variables(local
variables of Ti)
After reading all the write operations are made on temporary variables instead of
actual Database.
ā€¢VALIDATION PHASE:-In this validation test is performed to determine whether changes
in actual
database can be made.
ā€¢WRITE PHASE:- If Ti clear the validation test then actual changes are made to
database.
Validation test ensures the violation free execution of transaction.
ā€¢Timestamp is used to determine when to start validation test.
ā€¢Every Ti is associated with three timestamp which are:-
1.Start(Ti):- It gives time when it start execution.
2.Validation(Ti):- It gives time when Ti finishes its read phase & starts its validation
phase.
3. Finish(Ti):- It gives time when Ti finished its execution or write phase.
ā€¢ If any transaction failed in validation test then its aborted & rollback.
VALIDATION TEST:-
To clear all the validation test by Ti then Ti must satisfy one of the following
condition:-
ā€¢ Finish(Ti)<Start(Ti):- It means Ti is older transaction and it get enabled before Tj
starts.
ā€¢ Finish(Ti)<Validate(Tj):- this ensures actual write by Ti & Tj will not overlap.
ā€¢ Validate(Ti)< Validate(Tj):- It ensures that Ti has completed read phase before Tj
complete read phase.
Example:-
Advantages:-
1. Avoid Cascading-rollbacks: This validation based scheme avoid cascading rollbacks since
the final write operations to the database are performed only after the transaction passes the
validation phase. If the transaction fails then no updation operation is performed in the database
So no dirty read will happen hence possibilities cascading-rollback would be null.
2. Avoid deadlock: Since a strict time-stamping based technique is used to maintain the specific
the specific order of transactions. Hence deadlock isnā€™t possible in this scheme.
Disadvantages:
1. Starvation: There might be a possibility of starvation for long-term transactions, due
to a sequence of conļ¬‚icting short-term transactions that cause the repeated sequence
of restarts of the long-term transactions so on and so forth. To avoid starvation ,
conļ¬‚icting transactions must be temporarily blocked for some time, to let the
long-term transactions to ļ¬nish.
Multiple Granularity
It is the size of data item allowed to lock and define a
hierarchy of data granularities , where the small
granularities are nested within larger ones.
Fine Granularity- refers to small data item size.
example - a tuple or an attribute.
Course Granularity- refers to large data item size
example - entire relation or a database.
The hereachy of data item of various size can be
represented in the form of a tree
Fig: Granularity Hierarchy
When a transaction locks a node in the tree explicitly , it implicitly locks all the
node descendants in the same mode.
ā€¢ Tj must traverse from the root of the tree to record ra1 to check whether this
request can be granted.
ā€¢ If any node in that path is locked in incompatiable mode then the lock request
can not be granted.
Intention Lock Modes
ļµ In addition to S and X lock modes, there are three additional lock modes with multiple granularity:
1. Intention shared(IS): indicates explicit locking at a lower level of tree but only with shared locks.
2. Intention exclusive(IX): indicates explicit locking at a lower level with exclusive or shared locks.
3. Shared and Intention exclusive(SIX): the subtree rooted by that node is locked explicitly in shared mode and explicit
locking is being done at a lower level with exclusive mode locks.
ļƒ˜ intention locks allow a higher level node to be locked in S or X mode without having to check all descendent
nodes.
Check the compatibility of each lock with another
THANK YOU

More Related Content

What's hot

2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMSDhananjaysinh Jhala
Ā 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlocksangrampatil81
Ā 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
Ā 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine DiagramNiloy Rocker
Ā 
DATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxDATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxShivamKrPathak
Ā 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
Ā 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating systemSara Ali
Ā 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocolsChethanMp7
Ā 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
Ā 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.MOHIT DADU
Ā 
deadlock handling
deadlock handlingdeadlock handling
deadlock handlingSuraj Kumar
Ā 
Transaction Properties in database | ACID Properties
Transaction Properties in database | ACID PropertiesTransaction Properties in database | ACID Properties
Transaction Properties in database | ACID Propertiesnomanbarki
Ā 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMSkoolkampus
Ā 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and propertiesChetan Mahawar
Ā 
Database management systems components
Database management systems componentsDatabase management systems components
Database management systems componentsmuhammad bilal
Ā 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOLKABILESH RAMAR
Ā 

What's hot (20)

Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
Ā 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
Ā 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
Ā 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
Ā 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
Ā 
DATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxDATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptx
Ā 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Ā 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
Ā 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
Ā 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
Ā 
Transaction states PPT
Transaction states PPTTransaction states PPT
Transaction states PPT
Ā 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
Ā 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
Ā 
Transaction Properties in database | ACID Properties
Transaction Properties in database | ACID PropertiesTransaction Properties in database | ACID Properties
Transaction Properties in database | ACID Properties
Ā 
Topological Sort
Topological SortTopological Sort
Topological Sort
Ā 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
Ā 
Semi join
Semi joinSemi join
Semi join
Ā 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
Ā 
Database management systems components
Database management systems componentsDatabase management systems components
Database management systems components
Ā 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL
Ā 

Similar to VALIDATION BASED PROTOCOL AND MULTIPLE GRANULARITY.pptx

DBMS Presentation.pptx
DBMS Presentation.pptxDBMS Presentation.pptx
DBMS Presentation.pptxPravinBhargav1
Ā 
Concurrency control
Concurrency controlConcurrency control
Concurrency controlSubhasish Pati
Ā 
Concurrency note.pdf
Concurrency note.pdfConcurrency note.pdf
Concurrency note.pdfBijayNag1
Ā 
Concurrency control PPT
Concurrency control PPTConcurrency control PPT
Concurrency control PPTShushrutGupta
Ā 
Design & Development of an Advanced Database Management System Using Multiver...
Design & Development of an Advanced Database Management System Using Multiver...Design & Development of an Advanced Database Management System Using Multiver...
Design & Development of an Advanced Database Management System Using Multiver...IOSR Journals
Ā 
concurrencycontrol from power pint pdf a
concurrencycontrol  from power pint pdf aconcurrencycontrol  from power pint pdf a
concurrencycontrol from power pint pdf aMdAyanParwez
Ā 
Concurrency Control & Deadlock Handling
Concurrency Control & Deadlock HandlingConcurrency Control & Deadlock Handling
Concurrency Control & Deadlock HandlingMeghaj Mallick
Ā 
Concurrency control
Concurrency  controlConcurrency  control
Concurrency controlJaved Khan
Ā 
DBMS (Deadlock, deadlock prevention, 2phase locking)
DBMS (Deadlock, deadlock prevention, 2phase locking)DBMS (Deadlock, deadlock prevention, 2phase locking)
DBMS (Deadlock, deadlock prevention, 2phase locking)Gaurav Solanki
Ā 
Concurrency Control.pptx
Concurrency Control.pptxConcurrency Control.pptx
Concurrency Control.pptxVijaySourtha
Ā 
Unit 5 rdbms study_material
Unit 5  rdbms study_materialUnit 5  rdbms study_material
Unit 5 rdbms study_materialgayaramesh
Ā 
Concurrency control
Concurrency controlConcurrency control
Concurrency controlSoumyajit Dutta
Ā 
Adbms 43 multiversion concurrency control
Adbms 43 multiversion concurrency controlAdbms 43 multiversion concurrency control
Adbms 43 multiversion concurrency controlVaibhav Khanna
Ā 
Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Rashid Khan
Ā 
Concurrency Control
Concurrency ControlConcurrency Control
Concurrency ControlNishant Munjal
Ā 

Similar to VALIDATION BASED PROTOCOL AND MULTIPLE GRANULARITY.pptx (20)

DBMS Presentation.pptx
DBMS Presentation.pptxDBMS Presentation.pptx
DBMS Presentation.pptx
Ā 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Ā 
Concurrency note.pdf
Concurrency note.pdfConcurrency note.pdf
Concurrency note.pdf
Ā 
Concurrency control PPT
Concurrency control PPTConcurrency control PPT
Concurrency control PPT
Ā 
F017213747
F017213747F017213747
F017213747
Ā 
F017213747
F017213747F017213747
F017213747
Ā 
Design & Development of an Advanced Database Management System Using Multiver...
Design & Development of an Advanced Database Management System Using Multiver...Design & Development of an Advanced Database Management System Using Multiver...
Design & Development of an Advanced Database Management System Using Multiver...
Ā 
concurrencycontrol from power pint pdf a
concurrencycontrol  from power pint pdf aconcurrencycontrol  from power pint pdf a
concurrencycontrol from power pint pdf a
Ā 
Concurrency Control & Deadlock Handling
Concurrency Control & Deadlock HandlingConcurrency Control & Deadlock Handling
Concurrency Control & Deadlock Handling
Ā 
Concurrency control
Concurrency control Concurrency control
Concurrency control
Ā 
Concurrency control
Concurrency  controlConcurrency  control
Concurrency control
Ā 
DBMS (Deadlock, deadlock prevention, 2phase locking)
DBMS (Deadlock, deadlock prevention, 2phase locking)DBMS (Deadlock, deadlock prevention, 2phase locking)
DBMS (Deadlock, deadlock prevention, 2phase locking)
Ā 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
Ā 
Concurrency Control.pptx
Concurrency Control.pptxConcurrency Control.pptx
Concurrency Control.pptx
Ā 
Unit 5 rdbms study_material
Unit 5  rdbms study_materialUnit 5  rdbms study_material
Unit 5 rdbms study_material
Ā 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Ā 
Adbms 43 multiversion concurrency control
Adbms 43 multiversion concurrency controlAdbms 43 multiversion concurrency control
Adbms 43 multiversion concurrency control
Ā 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
Ā 
Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)Database concurrency control &amp; recovery (1)
Database concurrency control &amp; recovery (1)
Ā 
Concurrency Control
Concurrency ControlConcurrency Control
Concurrency Control
Ā 

More from SamyakJain710491

Bayesian Belief Network and its Applications.pptx
Bayesian Belief Network and its Applications.pptxBayesian Belief Network and its Applications.pptx
Bayesian Belief Network and its Applications.pptxSamyakJain710491
Ā 
Compiler Design PPT.pptx
Compiler Design PPT.pptxCompiler Design PPT.pptx
Compiler Design PPT.pptxSamyakJain710491
Ā 
performance appraisal at Tech Mahindra.pptx
performance appraisal at Tech Mahindra.pptxperformance appraisal at Tech Mahindra.pptx
performance appraisal at Tech Mahindra.pptxSamyakJain710491
Ā 
Process Based Estimation.pptx
Process Based Estimation.pptxProcess Based Estimation.pptx
Process Based Estimation.pptxSamyakJain710491
Ā 
Internet Protocol(Samyak Jain 25014).pptx
Internet Protocol(Samyak Jain 25014).pptxInternet Protocol(Samyak Jain 25014).pptx
Internet Protocol(Samyak Jain 25014).pptxSamyakJain710491
Ā 
Equivalence of DFAs and NFAs.pptx
Equivalence of DFAs and NFAs.pptxEquivalence of DFAs and NFAs.pptx
Equivalence of DFAs and NFAs.pptxSamyakJain710491
Ā 
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptx
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptxBinomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptx
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptxSamyakJain710491
Ā 
Cache Coherence.pptx
Cache Coherence.pptxCache Coherence.pptx
Cache Coherence.pptxSamyakJain710491
Ā 
Process and Thread Management in Solaris Operating System.pptx
Process and Thread Management in Solaris Operating System.pptxProcess and Thread Management in Solaris Operating System.pptx
Process and Thread Management in Solaris Operating System.pptxSamyakJain710491
Ā 

More from SamyakJain710491 (11)

Bayesian Belief Network and its Applications.pptx
Bayesian Belief Network and its Applications.pptxBayesian Belief Network and its Applications.pptx
Bayesian Belief Network and its Applications.pptx
Ā 
Compiler Design PPT.pptx
Compiler Design PPT.pptxCompiler Design PPT.pptx
Compiler Design PPT.pptx
Ā 
performance appraisal at Tech Mahindra.pptx
performance appraisal at Tech Mahindra.pptxperformance appraisal at Tech Mahindra.pptx
performance appraisal at Tech Mahindra.pptx
Ā 
Process Based Estimation.pptx
Process Based Estimation.pptxProcess Based Estimation.pptx
Process Based Estimation.pptx
Ā 
Internet Protocol(Samyak Jain 25014).pptx
Internet Protocol(Samyak Jain 25014).pptxInternet Protocol(Samyak Jain 25014).pptx
Internet Protocol(Samyak Jain 25014).pptx
Ā 
Equivalence of DFAs and NFAs.pptx
Equivalence of DFAs and NFAs.pptxEquivalence of DFAs and NFAs.pptx
Equivalence of DFAs and NFAs.pptx
Ā 
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptx
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptxBinomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptx
Binomial_Coefficient_and_World_series_problem_using_Dynamic_Programming.pptx
Ā 
Cache Coherence.pptx
Cache Coherence.pptxCache Coherence.pptx
Cache Coherence.pptx
Ā 
SWING.pptx
SWING.pptxSWING.pptx
SWING.pptx
Ā 
AVL tree PPT.pptx
AVL tree PPT.pptxAVL tree PPT.pptx
AVL tree PPT.pptx
Ā 
Process and Thread Management in Solaris Operating System.pptx
Process and Thread Management in Solaris Operating System.pptxProcess and Thread Management in Solaris Operating System.pptx
Process and Thread Management in Solaris Operating System.pptx
Ā 

Recently uploaded

ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,
ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,
ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,Virag Sontakke
Ā 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
Ā 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
Ā 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
Ā 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
Ā 
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
Ā 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
Ā 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Ā 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
Ā 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
Ā 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Ā 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
Ā 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
Ā 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
Ā 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
Ā 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
Ā 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Bikash Puri  Delhi reach out to us at šŸ”9953056974šŸ”Model Call Girl in Bikash Puri  Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Bikash Puri Delhi reach out to us at šŸ”9953056974šŸ”
Ā 
ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,
ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,
ą¤­ą¤¾ą¤°ą¤¤-ą¤°ą„‹ą¤® ą¤µą„ą¤Æą¤¾ą¤Ŗą¤¾ą¤°.pptx, Indo-Roman Trade,
Ā 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
Ā 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
Ā 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
Ā 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Ā 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Ā 
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ā€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
Ā 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
Ā 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
Ā 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Ā 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
Ā 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Ā 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Ā 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
Ā 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
Ā 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Ā 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
Ā 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
Ā 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
Ā 

VALIDATION BASED PROTOCOL AND MULTIPLE GRANULARITY.pptx

  • 1. VALIDATION BASED PROTOCOL AND MULTIPLE GRANULARITY VALIDATION BASED PROTOCOL PRESENTED BY: KASHISH HORA SAMYAK JAIN submitted to ā€“ Anju Sharma Mam
  • 2. INTRODUCTION ļµ Validation Based Protocol is also called Optimistic Concurrency Control Technique. This protocol is used in DBMS (Database Management System) for avoiding concurrency in transactions. ļµ It is called optimistic because of the assumption it makes, i.e. very less interference occurs, therefore, there is no need for checking while the transaction is executed. ļµ In this technique, no checking is done while the transaction is been executed. Until the transaction end is reached updates in the transaction are not applied directly to the database. All updates are applied to local copies of data items kept for the transaction. ļµ At the end of transaction execution, while execution of the transaction, a validation phase checks whether any of transaction updates violate serializability. If there is no violation of serializability the transaction is committed and the database is updated; or else, the transaction is updated and then restarted. ļµ Optimistic Concurrency Control is a three-phase protocol. The three phases for validation based protocol:
  • 3. ā€¢READ PHASE:- In this phase Ti reads all data & store them in temporary variables(local variables of Ti) After reading all the write operations are made on temporary variables instead of actual Database. ā€¢VALIDATION PHASE:-In this validation test is performed to determine whether changes in actual database can be made. ā€¢WRITE PHASE:- If Ti clear the validation test then actual changes are made to database. Validation test ensures the violation free execution of transaction. ā€¢Timestamp is used to determine when to start validation test. ā€¢Every Ti is associated with three timestamp which are:- 1.Start(Ti):- It gives time when it start execution. 2.Validation(Ti):- It gives time when Ti finishes its read phase & starts its validation phase. 3. Finish(Ti):- It gives time when Ti finished its execution or write phase. ā€¢ If any transaction failed in validation test then its aborted & rollback.
  • 4. VALIDATION TEST:- To clear all the validation test by Ti then Ti must satisfy one of the following condition:- ā€¢ Finish(Ti)<Start(Ti):- It means Ti is older transaction and it get enabled before Tj starts. ā€¢ Finish(Ti)<Validate(Tj):- this ensures actual write by Ti & Tj will not overlap. ā€¢ Validate(Ti)< Validate(Tj):- It ensures that Ti has completed read phase before Tj complete read phase. Example:-
  • 5. Advantages:- 1. Avoid Cascading-rollbacks: This validation based scheme avoid cascading rollbacks since the final write operations to the database are performed only after the transaction passes the validation phase. If the transaction fails then no updation operation is performed in the database So no dirty read will happen hence possibilities cascading-rollback would be null. 2. Avoid deadlock: Since a strict time-stamping based technique is used to maintain the specific the specific order of transactions. Hence deadlock isnā€™t possible in this scheme. Disadvantages: 1. Starvation: There might be a possibility of starvation for long-term transactions, due to a sequence of conļ¬‚icting short-term transactions that cause the repeated sequence of restarts of the long-term transactions so on and so forth. To avoid starvation , conļ¬‚icting transactions must be temporarily blocked for some time, to let the long-term transactions to ļ¬nish.
  • 6. Multiple Granularity It is the size of data item allowed to lock and define a hierarchy of data granularities , where the small granularities are nested within larger ones. Fine Granularity- refers to small data item size. example - a tuple or an attribute. Course Granularity- refers to large data item size example - entire relation or a database.
  • 7. The hereachy of data item of various size can be represented in the form of a tree Fig: Granularity Hierarchy
  • 8. When a transaction locks a node in the tree explicitly , it implicitly locks all the node descendants in the same mode. ā€¢ Tj must traverse from the root of the tree to record ra1 to check whether this request can be granted. ā€¢ If any node in that path is locked in incompatiable mode then the lock request can not be granted.
  • 9. Intention Lock Modes ļµ In addition to S and X lock modes, there are three additional lock modes with multiple granularity: 1. Intention shared(IS): indicates explicit locking at a lower level of tree but only with shared locks. 2. Intention exclusive(IX): indicates explicit locking at a lower level with exclusive or shared locks. 3. Shared and Intention exclusive(SIX): the subtree rooted by that node is locked explicitly in shared mode and explicit locking is being done at a lower level with exclusive mode locks. ļƒ˜ intention locks allow a higher level node to be locked in S or X mode without having to check all descendent nodes.
  • 10. Check the compatibility of each lock with another