SlideShare a Scribd company logo
1 of 22
Presented By:
Deepshikha Haritwal
(MCA/25001/18)
Roopak Bhama
(MCA/25003/18)
Contents
ā€¢ Introduction to transactions
ā€¢ Transaction Control
ā€¢ Properties of transactions
ā€¢ States of transactions
What is a Transaction?
ā€¢ A transaction is a basic unit of program
execution which possibly access and update
various data items in a database.
ā€¢ Collection of operations that form a single
logical unit of work are called transactions.
ā€¢ A transaction is delimited by statements of the
form begin transaction and end transaction.
ā€¢ The transaction consists of all operations
executed between the begin transaction and end
transaction.
Example of Transaction
ā€¢ A withdrawal transaction in an ATM could
consist of following steps:
ā–« Verify account details
ā–« Accept withdrawal request
ā–« Check balance
ā–« Update balance
ā–« Dispense money
Transaction control
ā€¢ The following commands are used to control
transactions.
ā–« COMMIT āˆ’ to save the changes.
ā–« ROLLBACK āˆ’ to roll back the changes.
ā–« SAVEPOINT āˆ’ creates points within the groups of
transactions in which to ROLLBACK.
ā–« SET TRANSACTION āˆ’ Places a name on a
transaction.
Commit command
ā€¢ The commit command is the transactional
command used to save changes invoked by a
transaction to the database.
ā€¢ The syntax for the commit command is as
follows:
ā–« COMMIT;
ā€¢ Example :
ā–« sql?>DELETE FROM CUSTOMERS WHERE AGE
= 25;
ā–« sql> COMMIT;
Rollback command
ā€¢ The rollback command is the transactional
command used to undo transactions that have
not already been saved to the database.
ā€¢ The syntax for a rollback command is āˆ’
ā–« ROLLBACK;
ā€¢ Example :
ā–« SQL> DELETE FROM CUSTOMERS WHERE
AGE = 25;
ā–« SQL> ROLLBACK;
Savepoint command
ā€¢ A savepoint is a point in a transaction when you
can roll the transaction back to a certain point
without rolling back the entire transaction.
ā€¢ The syntax for a savepoint command is:
ā–« SAVEPOINT SAVEPOINT_NAME;
Set transaction command
ā€¢ The set transaction command can be used to
initiate a database transaction.
ā€¢ For example we can specify a transaction to be
read only or read write.
ā€¢ The syntax for a set transaction command is:
ā–« SET TRANSACTION [ READ WRITE | READ
ONLY ];
Properties of Transactions
ā€¢ In order to maintain consistency in a database,
before and after transaction, certain properties
are followed.
ā€¢ These are called ACID properties.
ā–« A: Atomicity
ā–« C: Consistency
ā–« I: Isolation
ā–« D: Durability
Atomicity
ā€¢ It means that the entire transaction takes place
at once or doesnā€™t happen at all.
ā€¢ There is no midway i.e. transactions do not
occur partially.
ā€¢ It involves following two operations.
ā–« Abort: If a transaction aborts, changes made to
database are not visible.
ā–« Commit: If a transaction commits, changes made
are visible.
ā€¢ Atomicity is also known as the ā€˜All or nothing
ruleā€™.
Consistency
ā€¢ This means that integrity constraints must be
maintained so that the database is consistent
before and after the transaction.
ā€¢ It refers to correctness of a database.
Isolation
ā€¢ This property ensures that multiple transactions
can occur concurrently without leading to
inconsistency of database state.
ā€¢ Transactions occur independently without
interference.
ā€¢ Changes occurring in a particular transaction
will not be visible to any other transaction until
that particular change in that transaction is
written to memory or has been committed.
Durability
ā€¢ This property ensures that once the transaction
has completed execution, the updates and
modifications to the database are stored in and
written to disk.
ā€¢ These updates now become permanent and are
stored in a non-volatile memory.
ā€¢ The effects of the transaction, thus, are never
lost.
Transaction States
ā€¢ While the transaction executes in a database it
could be in one of the following states:
ā–« Active : In this state, the transaction is being
executed. This is the initial state of every
transaction.
ā–« Partially committed: When a transaction
executes its final operation, it is said to be in a
partially committed state.
ā–« Failed : A transaction is said to be in a failed state
if any of the checks made by the database recovery
system fails. A failed transaction can no longer
proceed further.
ā–« Aborted: If any of the checks fails and the
transaction has reached a failed state, then the
recovery manager rolls back all its write operations
on the database to bring the database back to its
original state where it was prior to the execution of
the transaction. Transactions in this state are
called aborted.
ā–« Committed: If a transaction executes all its
operations successfully, it is said to be committed.
All its effects are now permanently established on
the database system
Demonstrating transaction states
ā€¢ Consider a user making a booking for a flight
over a web.
ā€¢ While the user is selecting the time for departure
and the seat available, the transaction is said to
be in active state.
ā€¢ When the user is making the payment for the
tickets, the transaction is said to be partially
commited.
ā€¢ While making the payment if the system crashes
or network connection goes off, the transaction
may be aborted.
ā€¢ Otherwise, if successful payment is made the
transaction is said to be committed.
Transaction Processing its properties & States

More Related Content

What's hot

Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!Ashish K
Ā 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSSjlinabary
Ā 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)Dushmanta Nath
Ā 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLHowpk
Ā 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in cvampugani
Ā 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control TechniquesRaj vardhan
Ā 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptAndres Baravalle
Ā 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xamppJin Castor
Ā 
Presentation on Segmentation
Presentation on SegmentationPresentation on Segmentation
Presentation on SegmentationPriyanka bisht
Ā 
Html frames
Html framesHtml frames
Html frameseShikshak
Ā 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
Ā 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmleShikshak
Ā 
Chapter18
Chapter18Chapter18
Chapter18gourab87
Ā 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c languagetanmaymodi4
Ā 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management SystemJanki Shah
Ā 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Treekhabbab_h
Ā 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data StructureMeghaj Mallick
Ā 

What's hot (20)

Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!
Ā 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
Ā 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
Ā 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTML
Ā 
Deadlock dbms
Deadlock dbmsDeadlock dbms
Deadlock dbms
Ā 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
Ā 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control Techniques
Ā 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Ā 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
Ā 
Presentation on Segmentation
Presentation on SegmentationPresentation on Segmentation
Presentation on Segmentation
Ā 
Html frames
Html framesHtml frames
Html frames
Ā 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Ā 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
Ā 
Chapter18
Chapter18Chapter18
Chapter18
Ā 
Css
CssCss
Css
Ā 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
Ā 
Huffman Encoding Pr
Huffman Encoding PrHuffman Encoding Pr
Huffman Encoding Pr
Ā 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
Ā 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
Ā 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Ā 

Similar to Transaction Processing its properties & States

acid property.pptx
acid property.pptxacid property.pptx
acid property.pptxAjeet Mish
Ā 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxhritikraj888
Ā 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxKoteswari Kasireddy
Ā 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Yaksh Jethva
Ā 
Trancastion
TrancastionTrancastion
TrancastionRumeysaTalu
Ā 
Transaction processing
Transaction processingTransaction processing
Transaction processingSoumyajit Dutta
Ā 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbmsSweta Singh
Ā 
Presentation on Transaction
Presentation on TransactionPresentation on Transaction
Presentation on TransactionRahul Prajapati
Ā 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction ManagementYe Win
Ā 
8. transactions
8. transactions8. transactions
8. transactionsAmrit Kaur
Ā 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.pptNikhilKumarAgarwalK
Ā 
Transactionsmanagement
TransactionsmanagementTransactionsmanagement
TransactionsmanagementSanjeev Gupta
Ā 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction managementDr. C.V. Suresh Babu
Ā 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and propertiesChetan Mahawar
Ā 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction ManagementUMA MAHESWARI
Ā 
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdf
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdfLecture1414_20592_Lecture1419_Transactions.ppt (2).pdf
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdfbadboy624277
Ā 

Similar to Transaction Processing its properties & States (20)

Transactions
TransactionsTransactions
Transactions
Ā 
acid property.pptx
acid property.pptxacid property.pptx
acid property.pptx
Ā 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
Ā 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Ā 
Sql transacation
Sql transacationSql transacation
Sql transacation
Ā 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)
Ā 
Trancastion
TrancastionTrancastion
Trancastion
Ā 
Transaction processing
Transaction processingTransaction processing
Transaction processing
Ā 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbms
Ā 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
Ā 
Presentation on Transaction
Presentation on TransactionPresentation on Transaction
Presentation on Transaction
Ā 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction Management
Ā 
8. transactions
8. transactions8. transactions
8. transactions
Ā 
DBMS 4.pdf
DBMS 4.pdfDBMS 4.pdf
DBMS 4.pdf
Ā 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.ppt
Ā 
Transactionsmanagement
TransactionsmanagementTransactionsmanagement
Transactionsmanagement
Ā 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction management
Ā 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
Ā 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction Management
Ā 
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdf
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdfLecture1414_20592_Lecture1419_Transactions.ppt (2).pdf
Lecture1414_20592_Lecture1419_Transactions.ppt (2).pdf
Ā 

More from Meghaj Mallick

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderingsMeghaj Mallick
Ā 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSMeghaj Mallick
Ā 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software TestingMeghaj Mallick
Ā 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System ProgrammingMeghaj Mallick
Ā 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & MultimediaMeghaj Mallick
Ā 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPCMeghaj Mallick
Ā 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole OptimizationMeghaj Mallick
Ā 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANETMeghaj Mallick
Ā 
Macro assembler
 Macro assembler Macro assembler
Macro assemblerMeghaj Mallick
Ā 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPTMeghaj Mallick
Ā 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringMeghaj Mallick
Ā 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningMeghaj Mallick
Ā 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmMeghaj Mallick
Ā 
Software Development Method
Software Development MethodSoftware Development Method
Software Development MethodMeghaj Mallick
Ā 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodMeghaj Mallick
Ā 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in OrganizationMeghaj Mallick
Ā 
Communication Skill
Communication SkillCommunication Skill
Communication SkillMeghaj Mallick
Ā 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete MathematicsMeghaj Mallick
Ā 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure Meghaj Mallick
Ā 

More from Meghaj Mallick (20)

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
Ā 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
Ā 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
Ā 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
Ā 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
Ā 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
Ā 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
Ā 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
Ā 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
Ā 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
Ā 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
Ā 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
Ā 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
Ā 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
Ā 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
Ā 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
Ā 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
Ā 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
Ā 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
Ā 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
Ā 

Recently uploaded

Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
Ā 
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )Pooja Nehwal
Ā 
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrSaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrsaastr
Ā 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
Ā 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
Ā 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
Ā 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
Ā 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
Ā 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
Ā 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
Ā 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
Ā 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
Ā 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
Ā 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
Ā 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024eCommerce Institute
Ā 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
Ā 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
Ā 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
Ā 
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”soniya singh
Ā 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
Ā 

Recently uploaded (20)

Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
Ā 
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )
WhatsApp šŸ“ž 9892124323 āœ…Call Girls In Juhu ( Mumbai )
Ā 
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrSaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
Ā 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Ā 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
Ā 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
Ā 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Ā 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
Ā 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Ā 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
Ā 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Ā 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Ā 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
Ā 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Ā 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
Ā 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Ā 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Ā 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
Ā 
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Rohini Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Ā 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Ā 

Transaction Processing its properties & States

  • 2. Contents ā€¢ Introduction to transactions ā€¢ Transaction Control ā€¢ Properties of transactions ā€¢ States of transactions
  • 3. What is a Transaction? ā€¢ A transaction is a basic unit of program execution which possibly access and update various data items in a database. ā€¢ Collection of operations that form a single logical unit of work are called transactions.
  • 4. ā€¢ A transaction is delimited by statements of the form begin transaction and end transaction. ā€¢ The transaction consists of all operations executed between the begin transaction and end transaction.
  • 5. Example of Transaction ā€¢ A withdrawal transaction in an ATM could consist of following steps: ā–« Verify account details ā–« Accept withdrawal request ā–« Check balance ā–« Update balance ā–« Dispense money
  • 6. Transaction control ā€¢ The following commands are used to control transactions. ā–« COMMIT āˆ’ to save the changes. ā–« ROLLBACK āˆ’ to roll back the changes. ā–« SAVEPOINT āˆ’ creates points within the groups of transactions in which to ROLLBACK. ā–« SET TRANSACTION āˆ’ Places a name on a transaction.
  • 7. Commit command ā€¢ The commit command is the transactional command used to save changes invoked by a transaction to the database. ā€¢ The syntax for the commit command is as follows: ā–« COMMIT; ā€¢ Example : ā–« sql?>DELETE FROM CUSTOMERS WHERE AGE = 25; ā–« sql> COMMIT;
  • 8. Rollback command ā€¢ The rollback command is the transactional command used to undo transactions that have not already been saved to the database. ā€¢ The syntax for a rollback command is āˆ’ ā–« ROLLBACK; ā€¢ Example : ā–« SQL> DELETE FROM CUSTOMERS WHERE AGE = 25; ā–« SQL> ROLLBACK;
  • 9. Savepoint command ā€¢ A savepoint is a point in a transaction when you can roll the transaction back to a certain point without rolling back the entire transaction. ā€¢ The syntax for a savepoint command is: ā–« SAVEPOINT SAVEPOINT_NAME;
  • 10. Set transaction command ā€¢ The set transaction command can be used to initiate a database transaction. ā€¢ For example we can specify a transaction to be read only or read write. ā€¢ The syntax for a set transaction command is: ā–« SET TRANSACTION [ READ WRITE | READ ONLY ];
  • 11. Properties of Transactions ā€¢ In order to maintain consistency in a database, before and after transaction, certain properties are followed. ā€¢ These are called ACID properties. ā–« A: Atomicity ā–« C: Consistency ā–« I: Isolation ā–« D: Durability
  • 12. Atomicity ā€¢ It means that the entire transaction takes place at once or doesnā€™t happen at all. ā€¢ There is no midway i.e. transactions do not occur partially.
  • 13. ā€¢ It involves following two operations. ā–« Abort: If a transaction aborts, changes made to database are not visible. ā–« Commit: If a transaction commits, changes made are visible. ā€¢ Atomicity is also known as the ā€˜All or nothing ruleā€™.
  • 14. Consistency ā€¢ This means that integrity constraints must be maintained so that the database is consistent before and after the transaction. ā€¢ It refers to correctness of a database.
  • 15. Isolation ā€¢ This property ensures that multiple transactions can occur concurrently without leading to inconsistency of database state. ā€¢ Transactions occur independently without interference. ā€¢ Changes occurring in a particular transaction will not be visible to any other transaction until that particular change in that transaction is written to memory or has been committed.
  • 16. Durability ā€¢ This property ensures that once the transaction has completed execution, the updates and modifications to the database are stored in and written to disk. ā€¢ These updates now become permanent and are stored in a non-volatile memory. ā€¢ The effects of the transaction, thus, are never lost.
  • 17. Transaction States ā€¢ While the transaction executes in a database it could be in one of the following states: ā–« Active : In this state, the transaction is being executed. This is the initial state of every transaction. ā–« Partially committed: When a transaction executes its final operation, it is said to be in a partially committed state.
  • 18. ā–« Failed : A transaction is said to be in a failed state if any of the checks made by the database recovery system fails. A failed transaction can no longer proceed further. ā–« Aborted: If any of the checks fails and the transaction has reached a failed state, then the recovery manager rolls back all its write operations on the database to bring the database back to its original state where it was prior to the execution of the transaction. Transactions in this state are called aborted. ā–« Committed: If a transaction executes all its operations successfully, it is said to be committed. All its effects are now permanently established on the database system
  • 19.
  • 20. Demonstrating transaction states ā€¢ Consider a user making a booking for a flight over a web. ā€¢ While the user is selecting the time for departure and the seat available, the transaction is said to be in active state. ā€¢ When the user is making the payment for the tickets, the transaction is said to be partially commited.
  • 21. ā€¢ While making the payment if the system crashes or network connection goes off, the transaction may be aborted. ā€¢ Otherwise, if successful payment is made the transaction is said to be committed.