SlideShare a Scribd company logo
1 of 23
UNIT NO 5
TRANSACTION
PROCESSING
ARVIND S. SARDAR
TRANSACTION
TRANSACTION CONCEPT
• A transaction can be defined as a group of tasks.
• A single task is the minimum processing unit which cannot be divided further.
• Let’s take an example of a simple transaction.
• Transactions access data using read and write operations.
TRANSACTION
• Suppose a bank employee transfers Rs 500 from A's account to B's account. This very
simple and small transaction involves several low-level tasks.
• A’s Account
• Open_Account(A)
• Old_Balance = A.balance
• New_Balance = Old_Balance – 500
• A.balance = New_Balance Close_Account(A)
B’s Account
Open_Account(B)
Old_Balance = B.balance
New_Balance = Old_Balance + 500
B.balance = New_Balance Close_Account(B)
TRANSACTION PROPERTY
ACID Properties
• A transaction in a database system must maintain Atomicity, Consistency, Isolation,
and Durability − commonly known as ACID properties − in order to ensure accuracy,
completeness, and data integrity.
• Atomicity − This property states that a transaction must be treated as an atomic unit,
that is, either all of its operations are executed or none. There must be no state in a
database where a transaction is left partially completed. States should be defined either
before the execution of the transaction or after the execution/abortion/failure of the
transaction.
• Consistency − The database must remain in a consistent state after any transaction. No
transaction should have any adverse effect on the data residing in the database. If the
database was in a consistent state before the execution of a transaction, it must remain
consistent after the execution of the transaction as well.
TRANSACTION
• Durability − The database should be durable enough to hold all its
latest updates even if the system fails or restarts. If a transaction updates
a chunk of data in a database and commits, then the database will hold
the modified data. If a transaction commits but the system fails before
the data could be written on to the disk, then that data will be updated
once the system springs back into action.
• Isolation − In a database system where more than one transaction are
being executed simultaneously and in parallel, the property of isolation
states that all the transactions will be carried out and executed as if it is
the only transaction in the system. No transaction will affect the
existence of any other transaction.
TRANSACTION
Atomicity: A transaction is an atomic unit of processing, and it either has to
be performed in its entirety or not at all.
Consistency: A successful execution of a transaction must take a consistent
database state to a (new) consistent database state. (integrity constraints)
Isolation: A transaction must not make its modifications visible to other
transactions until it is committed, i.e., each transaction is unaware of other
transactions executing concurrently in the system. ( concurrency control)
Durability: Once a transaction has committed its changes, these changes
must never get lost due to subsequent (system) failures. ( recovery)
States of Transactions
• A transaction in a database can be in one of the following states −
States of Transactions
States of Transactions
1. Active State-
• This is the first state in the life cycle of a transaction.
• A transaction is called in an active state as long as its instructions are getting
executed.
• All the changes made by the transaction now are stored in the buffer in main
memory.
2. Partially Committed State-
• After the last instruction of transaction has executed, it enters into a partially
committed state.
• After entering this state, the transaction is considered to be partially committed.
• It is not considered fully committed because all the changes made by the transaction
are still stored in the buffer in main memory.
States of Transactions
3. Committed State-
• After all the changes made by the transaction have been successfully stored into the
database, it enters into a committed state.
• Now, the transaction is considered to be fully committe
4. Failed State-
• When a transaction is getting executed in the active state or partially committed state and
some failure occurs due to which it becomes impossible to continue the execution, it
enters into a failed state.
States of Transactions
5. Aborted State-
• After the transaction has failed and entered into a failed state, all the
changes made by it have to be undone.
• To undo the changes made by the transaction, it becomes necessary to roll
back the transaction.
• After the transaction has rolled back completely, it enters into an aborted
state
DATABASE BACKUP
• Database backup is the process of backing up the operational state, architecture
and stored data of database software.
Types of Failure
Failures may be
• Transaction: Caused by errors within the transaction processes.
• System: Caused by failure of network or operating system
• Media: Failure of hard disk, out of memory errors, out of disk space errors.
• Human error
• Software failure
• Hardware failure
Causes of failure
TYPES OF DATABASE BACKUP
There are more than ten different types of data backup
Full backup
A full backup is when every single file and folder in the system is backed up.
A full backup takes longer and requires more space than other types of
backups but the process of restoring lost data from backup is much faster.
Incremental backup
With incremental backup, only the initial backup is a full one. Subsequent
backups only stores changes that were made since the previous backup.
The process of restoring lost data from backup is longer but the backup
process is much quicker.
TYPES OF DATABASE BACKUP
Differential backup
Differential backup is similar to incremental backup. With both, the initial backup is full
and subsequent backups only store changes made to files since the last backup. This
type of backup requires more storage space than incremental backup does, however, but it
also allows for a faster restore time.
Mirror backup
A mirror backup, as the name implies, is when an exact copy is made of the source data. The
advantage of mirror backup as opposed to full, incremental, or differential backups, is that you’re
not storing old, obsolete files.
When obsolete files are deleted, they disappear from the mirror backup as well when the system
backs up. The downside to mirror backup is that if files are accidentally deleted, they can be lost
from the backup is well if the deletion isn’t discovered before the next scheduled backup.
TYPES OF DATABASE BACKUP
• Physical Backup
• Logical Backup
TYPES OF DATABASE BACKUP
TYPES OF DATABASE BACKUP
Physical Files, such as text files, are stored as a single
document on your hard drive. These files can easily be backed
up just like any other files on your system.
Logical Data Elements such as tables, records and their
associated meta data are stored across many different
locations. Backups for tables and other logical database
elements usually require special tools that are designed to
work with your specific database platforms.
DATABASE RECOVERY
• Database recovery means recovering the data when it get deleted, hacked or
damaged accidentally.
• Recovery is the process of restoring a database to the correct state in the
event of a failure.
• It ensures that the database is reliable and remains in consistent state in
case of a failure.
• To restore a physical backup of a data file or control file is to reconstruct it
and make it available to the database server.
DATABASE RECOVERY
Database recovery can be classified into two parts;
1. Rolling Forward applies redo records to the corresponding data
blocks. After the roll forward, any changes that were not
committed must be undone.
2. Rolling Back applies rollback segments to the data files. It is
stored in transaction tables.
DATABASE RECOVERY
Basic Recovery Steps: Rolling Forward and Rolling Back"
ACID Properties and States of Transactions

More Related Content

What's hot

Library management system
Library management systemLibrary management system
Library management systemParesh Gosavi
 
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureHadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureSkillspeed
 
Database Systems
Database SystemsDatabase Systems
Database SystemsUsman Tariq
 
Sales and inventory management system project report
Sales and inventory management system project reportSales and inventory management system project report
Sales and inventory management system project reportFuckboy123
 
Single User v/s Multi User Databases
Single User v/s Multi User DatabasesSingle User v/s Multi User Databases
Single User v/s Multi User DatabasesRaminder Pal Singh
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlAbDul ThaYyal
 
cloud computing, Principle and Paradigms: 1 introdution
cloud computing, Principle and Paradigms: 1 introdutioncloud computing, Principle and Paradigms: 1 introdution
cloud computing, Principle and Paradigms: 1 introdutionMajid Hajibaba
 
Load balancing in cloud computing.pptx
Load balancing in cloud computing.pptxLoad balancing in cloud computing.pptx
Load balancing in cloud computing.pptxHitesh Mohapatra
 
Memory management
Memory managementMemory management
Memory managementcpjcollege
 
Database connectivity and web technologies
Database connectivity and web technologiesDatabase connectivity and web technologies
Database connectivity and web technologiesDhani Ahmad
 
The relational database model
The relational database modelThe relational database model
The relational database modelDhani Ahmad
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architectureAkash Pramanik
 

What's hot (20)

Library management system
Library management systemLibrary management system
Library management system
 
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureHadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
 
Oracle
OracleOracle
Oracle
 
Cloud Computing - Introduction
Cloud Computing - IntroductionCloud Computing - Introduction
Cloud Computing - Introduction
 
Database Systems
Database SystemsDatabase Systems
Database Systems
 
Sales and inventory management system project report
Sales and inventory management system project reportSales and inventory management system project report
Sales and inventory management system project report
 
Single User v/s Multi User Databases
Single User v/s Multi User DatabasesSingle User v/s Multi User Databases
Single User v/s Multi User Databases
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency control
 
Informatica slides
Informatica slidesInformatica slides
Informatica slides
 
Virtualization
VirtualizationVirtualization
Virtualization
 
cloud computing, Principle and Paradigms: 1 introdution
cloud computing, Principle and Paradigms: 1 introdutioncloud computing, Principle and Paradigms: 1 introdution
cloud computing, Principle and Paradigms: 1 introdution
 
Cloud Computing paradigm
Cloud Computing paradigmCloud Computing paradigm
Cloud Computing paradigm
 
Load balancing in cloud computing.pptx
Load balancing in cloud computing.pptxLoad balancing in cloud computing.pptx
Load balancing in cloud computing.pptx
 
Memory management
Memory managementMemory management
Memory management
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Memory management
Memory managementMemory management
Memory management
 
Database connectivity and web technologies
Database connectivity and web technologiesDatabase connectivity and web technologies
Database connectivity and web technologies
 
The relational database model
The relational database modelThe relational database model
The relational database model
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
 

Similar to ACID Properties and States of Transactions

Backup & Recovery
Backup & RecoveryBackup & Recovery
Backup & RecoveryAbhay Kumar
 
BACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBaivabiNayak
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Yaksh Jethva
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...Raj vardhan
 
data warehousing need and characteristics. types of data w data warehouse arc...
data warehousing need and characteristics. types of data w data warehouse arc...data warehousing need and characteristics. types of data w data warehouse arc...
data warehousing need and characteristics. types of data w data warehouse arc...aasifkuchey85
 
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
 
acid property.pptx
acid property.pptxacid property.pptx
acid property.pptxAjeet Mish
 
Presentation on Transaction
Presentation on TransactionPresentation on Transaction
Presentation on TransactionRahul Prajapati
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and RecoveryMaham Huda
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)Abdullah Khosa
 
MySQL enterprise backup overview
MySQL enterprise backup overviewMySQL enterprise backup overview
MySQL enterprise backup overview郁萍 王
 
MySQL Enterprise Backup
MySQL Enterprise BackupMySQL Enterprise Backup
MySQL Enterprise BackupMario Beck
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basicsShahed Mohamed
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing ConceptNishant Munjal
 

Similar to ACID Properties and States of Transactions (20)

DBMS Vardhaman.pdf
DBMS Vardhaman.pdfDBMS Vardhaman.pdf
DBMS Vardhaman.pdf
 
Backup & Recovery
Backup & RecoveryBackup & Recovery
Backup & Recovery
 
BACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMS
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...
 
data warehousing need and characteristics. types of data w data warehouse arc...
data warehousing need and characteristics. types of data w data warehouse arc...data warehousing need and characteristics. types of data w data warehouse arc...
data warehousing need and characteristics. types of data w data warehouse arc...
 
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
 
acid property.pptx
acid property.pptxacid property.pptx
acid property.pptx
 
Crash recovery in database
Crash recovery in databaseCrash recovery in database
Crash recovery in database
 
DBMS unit-5.pdf
DBMS unit-5.pdfDBMS unit-5.pdf
DBMS unit-5.pdf
 
Presentation on Transaction
Presentation on TransactionPresentation on Transaction
Presentation on Transaction
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and Recovery
 
Db lec 07_new
Db lec 07_newDb lec 07_new
Db lec 07_new
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
MySQL enterprise backup overview
MySQL enterprise backup overviewMySQL enterprise backup overview
MySQL enterprise backup overview
 
MySQL Enterprise Backup
MySQL Enterprise BackupMySQL Enterprise Backup
MySQL Enterprise Backup
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing Concept
 

More from ARVIND SARDAR

Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introductionARVIND SARDAR
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.pptARVIND SARDAR
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assARVIND SARDAR
 
Computer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersComputer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersARVIND SARDAR
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20ARVIND SARDAR
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20ARVIND SARDAR
 
Project activity planning
Project activity planningProject activity planning
Project activity planningARVIND SARDAR
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20ARVIND SARDAR
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20ARVIND SARDAR
 
PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319ARVIND SARDAR
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019ARVIND SARDAR
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019ARVIND SARDAR
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019ARVIND SARDAR
 
Unit 1 dbm questioN BANK 22139
Unit 1 dbm  questioN BANK 22139Unit 1 dbm  questioN BANK 22139
Unit 1 dbm questioN BANK 22139ARVIND SARDAR
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319ARVIND SARDAR
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319ARVIND SARDAR
 
DMS 22319 Viva questions
DMS 22319 Viva questions DMS 22319 Viva questions
DMS 22319 Viva questions ARVIND SARDAR
 

More from ARVIND SARDAR (20)

Machine Learning Chapter one introduction
Machine Learning Chapter one introductionMachine Learning Chapter one introduction
Machine Learning Chapter one introduction
 
Lecture5.pptx
Lecture5.pptxLecture5.pptx
Lecture5.pptx
 
Machine Learning Ch 1.ppt
Machine Learning Ch 1.pptMachine Learning Ch 1.ppt
Machine Learning Ch 1.ppt
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-ass
 
Computer foundation course -Knowing Computers
Computer foundation course -Knowing ComputersComputer foundation course -Knowing Computers
Computer foundation course -Knowing Computers
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20
 
Teaching plan d1 dms 2019 20
Teaching plan  d1 dms 2019  20Teaching plan  d1 dms 2019  20
Teaching plan d1 dms 2019 20
 
Project activity planning
Project activity planningProject activity planning
Project activity planning
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20
 
D2 practical planning dms 2019 20
D2 practical  planning dms 2019 20D2 practical  planning dms 2019 20
D2 practical planning dms 2019 20
 
PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319
 
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019
 
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019
 
Unit 1 dbm questioN BANK 22139
Unit 1 dbm  questioN BANK 22139Unit 1 dbm  questioN BANK 22139
Unit 1 dbm questioN BANK 22139
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319
 
CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319CO PO MAPPING CO3I DMS 22319
CO PO MAPPING CO3I DMS 22319
 
DMS 22319 Viva questions
DMS 22319 Viva questions DMS 22319 Viva questions
DMS 22319 Viva questions
 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 

ACID Properties and States of Transactions

  • 2. TRANSACTION TRANSACTION CONCEPT • A transaction can be defined as a group of tasks. • A single task is the minimum processing unit which cannot be divided further. • Let’s take an example of a simple transaction. • Transactions access data using read and write operations.
  • 3. TRANSACTION • Suppose a bank employee transfers Rs 500 from A's account to B's account. This very simple and small transaction involves several low-level tasks. • A’s Account • Open_Account(A) • Old_Balance = A.balance • New_Balance = Old_Balance – 500 • A.balance = New_Balance Close_Account(A) B’s Account Open_Account(B) Old_Balance = B.balance New_Balance = Old_Balance + 500 B.balance = New_Balance Close_Account(B)
  • 4. TRANSACTION PROPERTY ACID Properties • A transaction in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties − in order to ensure accuracy, completeness, and data integrity. • Atomicity − This property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none. There must be no state in a database where a transaction is left partially completed. States should be defined either before the execution of the transaction or after the execution/abortion/failure of the transaction. • Consistency − The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database. If the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well.
  • 5. TRANSACTION • Durability − The database should be durable enough to hold all its latest updates even if the system fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database will hold the modified data. If a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action. • Isolation − In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.
  • 6. TRANSACTION Atomicity: A transaction is an atomic unit of processing, and it either has to be performed in its entirety or not at all. Consistency: A successful execution of a transaction must take a consistent database state to a (new) consistent database state. (integrity constraints) Isolation: A transaction must not make its modifications visible to other transactions until it is committed, i.e., each transaction is unaware of other transactions executing concurrently in the system. ( concurrency control) Durability: Once a transaction has committed its changes, these changes must never get lost due to subsequent (system) failures. ( recovery)
  • 7.
  • 8. States of Transactions • A transaction in a database can be in one of the following states −
  • 10. States of Transactions 1. Active State- • This is the first state in the life cycle of a transaction. • A transaction is called in an active state as long as its instructions are getting executed. • All the changes made by the transaction now are stored in the buffer in main memory. 2. Partially Committed State- • After the last instruction of transaction has executed, it enters into a partially committed state. • After entering this state, the transaction is considered to be partially committed. • It is not considered fully committed because all the changes made by the transaction are still stored in the buffer in main memory.
  • 11. States of Transactions 3. Committed State- • After all the changes made by the transaction have been successfully stored into the database, it enters into a committed state. • Now, the transaction is considered to be fully committe 4. Failed State- • When a transaction is getting executed in the active state or partially committed state and some failure occurs due to which it becomes impossible to continue the execution, it enters into a failed state.
  • 12. States of Transactions 5. Aborted State- • After the transaction has failed and entered into a failed state, all the changes made by it have to be undone. • To undo the changes made by the transaction, it becomes necessary to roll back the transaction. • After the transaction has rolled back completely, it enters into an aborted state
  • 13. DATABASE BACKUP • Database backup is the process of backing up the operational state, architecture and stored data of database software. Types of Failure Failures may be • Transaction: Caused by errors within the transaction processes. • System: Caused by failure of network or operating system • Media: Failure of hard disk, out of memory errors, out of disk space errors. • Human error • Software failure • Hardware failure
  • 15. TYPES OF DATABASE BACKUP There are more than ten different types of data backup Full backup A full backup is when every single file and folder in the system is backed up. A full backup takes longer and requires more space than other types of backups but the process of restoring lost data from backup is much faster. Incremental backup With incremental backup, only the initial backup is a full one. Subsequent backups only stores changes that were made since the previous backup. The process of restoring lost data from backup is longer but the backup process is much quicker.
  • 16. TYPES OF DATABASE BACKUP Differential backup Differential backup is similar to incremental backup. With both, the initial backup is full and subsequent backups only store changes made to files since the last backup. This type of backup requires more storage space than incremental backup does, however, but it also allows for a faster restore time. Mirror backup A mirror backup, as the name implies, is when an exact copy is made of the source data. The advantage of mirror backup as opposed to full, incremental, or differential backups, is that you’re not storing old, obsolete files. When obsolete files are deleted, they disappear from the mirror backup as well when the system backs up. The downside to mirror backup is that if files are accidentally deleted, they can be lost from the backup is well if the deletion isn’t discovered before the next scheduled backup.
  • 17. TYPES OF DATABASE BACKUP • Physical Backup • Logical Backup
  • 19. TYPES OF DATABASE BACKUP Physical Files, such as text files, are stored as a single document on your hard drive. These files can easily be backed up just like any other files on your system. Logical Data Elements such as tables, records and their associated meta data are stored across many different locations. Backups for tables and other logical database elements usually require special tools that are designed to work with your specific database platforms.
  • 20. DATABASE RECOVERY • Database recovery means recovering the data when it get deleted, hacked or damaged accidentally. • Recovery is the process of restoring a database to the correct state in the event of a failure. • It ensures that the database is reliable and remains in consistent state in case of a failure. • To restore a physical backup of a data file or control file is to reconstruct it and make it available to the database server.
  • 21. DATABASE RECOVERY Database recovery can be classified into two parts; 1. Rolling Forward applies redo records to the corresponding data blocks. After the roll forward, any changes that were not committed must be undone. 2. Rolling Back applies rollback segments to the data files. It is stored in transaction tables.
  • 22. DATABASE RECOVERY Basic Recovery Steps: Rolling Forward and Rolling Back"