尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Department of Information Technology 1Data base Technologies (ITB4201)
Introduction to Transaction concepts
Dr. C.V. Suresh Babu
Professor
Department of IT
Hindustan Institute of Science & Technology
Department of Information Technology 2Data base Technologies (ITB4201)
Action Plan
• Transaction processing systems
• Introduction to TRANSACTION
• Need for TRANSACTION
• Operations
• Transaction Execution and Problems
• Transaction States
• Transaction Execution with SQL
• Transaction Properties
• Transaction Log
• Quiz
Department of Information Technology 3Data base Technologies (ITB4201)
Transaction processing systems
• Transaction is a logical unit of work that represents real-world events of
any organisation.
• Transaction processing systems execute database transactions with large
databases and hundreds of concurrent users,
for example,
• railway and air reservations systems,
• banking system,
• credit card processing,
• stock market monitoring,
• super market inventory and
• checkouts and so on.
Department of Information Technology 4Data base Technologies (ITB4201)
Introduction to TRANSACTION
• A transaction is a logical unit of work of database processing that includes one or more database
access operations.
• A transaction can be defined as an action or series of actions that is carried out by a single user or
application program to perform operations for accessing the contents of the database. The
operations can include
– retrieval (Read)
– insertion (Write)
– deletion and
– modification.
• A transaction must be either completed or aborted.
It can either be embedded within an application program or can be specified interactively via a high-
level query language such as SQL.
• Its execution preserves the consistency of the database.
Each transaction should access shared data without interfering with the other transactions and
whenever a transaction successfully completes its execution; its effect should be permanent.
Department of Information Technology 5Data base Technologies (ITB4201)
Need for TRANSACTION
This basic abstraction frees the database application programmer
from the following concerns :
• Inconsistencies caused by conflicting updates from concurrent
users.
• Partially completed transactions in the event of systems failure.
• User-directed undoing of transactions.
• A transaction is a sequence of READ and WRITE actions that are
grouped together to from a database access. A transaction may
consist of a simple SELECT operation to generate a list of table
contents, or it may consist of a series of related UPDATE command
sequences.
Department of Information Technology 6Data base Technologies (ITB4201)
Operations
• A transaction can include the following basic database access operations:
Operations Descriptions
Retrieve To retrieve data stored ina database.
Insert To store new data in database.
Delete To delete existing data from database.
Update To modify existing data in database.
Commit To save the work done permanently.
Rollback To undo the work done.
• Transaction that changes the contents of the database must alter the database from one consistent state to
another.
• A consistent database state is one in which all data integrity constraints are satisfied.
To ensure database consistency, every transaction must begin with the database in a known consistent state.
Department of Information Technology 7Data base Technologies (ITB4201)
Transaction Execution and Problems
• A transaction which successfully completes its execution is said
to have been committed. Otherwise, the transaction is
aborted.
• Thus, if a committed transaction performs any update
operation on the database, its effect must be reflected on the
database even if there is a failure.
Department of Information Technology 8Data base Technologies (ITB4201)
Transaction States
• A transaction can be in one of the following states:
Department of Information Technology 9Data base Technologies (ITB4201)
State Description
Active state
• A transaction goes into an active state immediately after it starts execution, where it
can issue READ and WRITE operations.
• A transaction may be aborted when the transaction itself detects an error during
execution which it cannot recover from, for example, a transaction trying to debit loan
amount of an employee from his insufficient gross salary.
• A transaction may also be aborted before it has been committed due to system failure
or any other circumstances beyond its control.
Partially
committed
• When the transaction ends, it moves to the partially committed state. When the last
state is reached.
• To this point, some recovery protocols need to ensure that a system failure will not
result in an inability to record the changes of the transaction permanently.
• Once this check is successful, the transaction is said to have reached its commit point
and enters the committed state.
Aborted
• When the normal execution can no longer be performed.
Failed or aborted transactions may be restarted later, either automatically or after
being resubmitted by the user as new transactions.
Committed
• After successful completion of transaction.
• A transaction is said to be in a committed state if it has partially committed and it can
be ensured that it will never be aborted.
Department of Information Technology 10Data base Technologies (ITB4201)
Transaction Execution with SQL
• The American National Standards Institute (ANSI) has defined standards that govern SQL database
transactions. Transaction support is provided by two SQL statements namely COMMIT and
ROLLBACK.
The ANSI standards require that, when a transaction sequence is initiated by a user or an application
program, it must continue through all succeeding SQL statements until one of the following four
events occur :
• A COMMIT statement is reached, in which case all changes are permanently recorded within the
database. The COMMIT statement automatically ends the SQL transaction. The COMMIT operations
indicates successful end-of-transaction.
• A ROLLBACK statement is reached, in which case all the changes are aborted and the database is
rolled back to its previous consistent state. The ROLLBACK operation indicates unsuccessful end-of-
transaction.
• The end of a program is successfully reached, in which case all changes are permanently recorded
within the database. This action is equivalent to COMMIT.
• The program is abnormally terminated, in which case the changes made in the database are aborted
and the database is rolled back to its previous consistent state. This action is equivalent to
ROLLBACK.
Department of Information Technology 11Data base Technologies (ITB4201)
Transaction Properties
A transaction must have the following four properties, called
ACID properties (also called ACIDITY of a transaction), to ensure
that a database remains stable state after the transaction is
executed:
• Atomicity.
• Consistency.
• Isolation.
• Durability.
Department of Information Technology 12Data base Technologies (ITB4201)
Atomicity
• The atomicity property of a transaction requires that all operations of a
transaction be completed, if not, the transaction is aborted. In other
words, a transaction is treated as single, individual logical unit of work.
Therefore, a transaction must execute and complete each operation in its
logic before it commits its changes.
• As stated earlier, the transaction is considered as one operation even
though there are multiple read and writes. Thus, transaction completes or
fails as one unit.
• The atomicity property of transaction is ensured by the transaction
recovery subsystem of a DBMS.
• In the event of a system crash in the midst of transaction execution, the
recovery techniques undo any effects of the transaction on the database.
Department of Information Technology 13Data base Technologies (ITB4201)
Consistency
• Database consistency is the property that every transaction sees a consistent database
instance. In other words, execution of a transaction must leave a database in either its prior
stable state or a new stable state that reflects the new modifications (updates) made by the
transaction.
• If the transaction fails, the database must be returned to the state it was in prior to the
execution of the failed transaction.
• If the transaction commits, the database must reflect the new changes. Thus, all resources
are always in a consistent state.
• The preservation of consistency is generally the responsibility of the programmers who
write the database programs or of the DBMS module that enforces integrity constraints.
• A database program should be written in a way that guarantees that, if the database is in a
consistent state before executing the transaction, it will be in a consistent state after the
complete execution of the transaction, assuming that no interference with other
transactions occur. In other words, a transaction must transform the database from one
consistent state to another consistent state.
Department of Information Technology 14Data base Technologies (ITB4201)
Isolation
• Isolation property of a transaction means that the data used
during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
• This property isolates transactions from one another. In other
words, if a transaction T1 is being executed and is using the
data item X, that data item cannot be accessed by any other
transaction (T2………..Tn) until T1 ends.
• The isolation property is enforced by the concurrency control
subsystem of the DBMS.
Department of Information Technology 15Data base Technologies (ITB4201)
Durability
• The durability property of transaction indicates the performance of
the database's consistent state. It states that the changes made by
a transaction are permanent.
• They cannot be lost by either a system failure or by the erroneous
operation of a faulty transaction.
• When a transaction is completed, the database reaches a
consistent state and that state cannot be lost, even in the event of
system's failure.
• Durability property is the responsibility of the recovery subsystem
of the DBMS.
Department of Information Technology 16Data base Technologies (ITB4201)
Transaction Log (or Journal)
To support transaction processing, DBMSs maintain a transaction record of every change made to the
database into a log (also called journal). For each transaction, the following data is recorded on the log:
A start-of-transaction marker.
• The transaction identifier which could include who and where information.
• The record identifiers which include the identifiers for the record occurrences.
• The operation(s) performed on the records (for example, insert, delete, modify).
• The previous value(s) of the modified data. This information is required for undoing the changes
made by a partially completed transaction. It is called the undo log. Where the modification made by
the transaction is the insertion of a new record, the previous values can be assumed to be null.
• The updated value(s) of the modified record(s). This information is required for making sure that the
changes made by a committed transaction are in fact reflected in the database and can be used to
redo these modifications. This information is called the redo part of the log. In case the modification
made by the transaction is the deletion of a record, the updated values can be assumed to be null.
• A commit transaction marker if the transaction is committed, otherwise an abort or rollback
transaction marker.
Department of Information Technology 17Data base Technologies (ITB4201)
Test Yourself
1. With regards to transaction processing, any DBMS should be capable of:
a. Ensuring that transactions are free from interference from other users.
b. Parts of a transaction are not lost due to a failure.
c. Transactions do not make the database inconsistent.
d. All of the above.
2. What is ACID properties of Transactions?
a. Atomicity, Consistency, Isolation, Database
b. Atomicity, Consistency, Inconsistent, Durability
c. Automatically, Concurrency, Isolation, Durability
d. Atomicity, Consistency, Isolation, Durability
3. A transaction completes its execution is said to be
a. Saved b. Loaded c. Rolled d. Committed
4. The deadlock state can be changed back to stable state by using _____________ statement.
a. Commit b. Rollback c. Savepoint d. Deadlock
5. A transaction for which all committed changes are permanent is called:
a. Atomic b. Consistent c. Isolated d. durable
Department of Information Technology 18Data base Technologies (ITB4201)
Answers
1. With regards to transaction processing, any DBMS should be capable of:
a. Ensuring that transactions are free from interference from other users.
b. Parts of a transaction are not lost due to a failure.
c. Transactions do not make the database inconsistent.
d. All of the above.
2. What is ACID properties of Transactions?
a. Atomicity, Consistency, Isolation, Database
b. Atomicity, Consistency, Inconsistent, Durability
c. Automatically, Concurrency, Isolation, Durability
d. Atomicity, Consistency, Isolation, Durability
3. A transaction completes its execution is said to be
a. Saved b. Loaded c. Rolled d. Committed
4. The deadlock state can be changed back to stable state by using _____________ statement.
a. Commit b. Rollback c. Savepoint d. Deadlock
5. A transaction for which all committed changes are permanent is called:
a. Atomic b. Consistent c. Isolated d. durable

More Related Content

What's hot

Concurrency control
Concurrency controlConcurrency control
Concurrency control
Subhasish Pati
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbms
Nancy Gulati
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
BBDITM LUCKNOW
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing Concept
Nishant Munjal
 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queries
Ifzalhussainkhan
 
Data models
Data modelsData models
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
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
Damian T. Gordon
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
koolkampus
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Soumyajit Dutta
 
ACID Property in DBMS
ACID Property in DBMSACID Property in DBMS
ACID Property in DBMS
Techtud Network
 
ACID- Database Transaction Properties
ACID- Database Transaction PropertiesACID- Database Transaction Properties
ACID- Database Transaction Properties
Markajul Hasnain Alif
 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
ChethanMp7
 
Stack organization
Stack organizationStack organization
Stack organization
chauhankapil
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
Janki Shah
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
Aprajita (Abbey) Singh
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
Dhani Ahmad
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
Dattatray Gandhmal
 

What's hot (20)

Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Transactions in dbms
Transactions in dbmsTransactions in dbms
Transactions in dbms
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing Concept
 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queries
 
Data models
Data modelsData models
Data models
 
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)
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
ACID Property in DBMS
ACID Property in DBMSACID Property in DBMS
ACID Property in DBMS
 
ACID- Database Transaction Properties
ACID- Database Transaction PropertiesACID- Database Transaction Properties
ACID- Database Transaction Properties
 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
 
Stack organization
Stack organizationStack organization
Stack organization
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 

Similar to Introduction to transaction management

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
Koteswari Kasireddy
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
Janagi Raman S
 
Sistem manajemen basis data 8
Sistem manajemen basis data   8Sistem manajemen basis data   8
Sistem manajemen basis data 8
Universitas Putera Batam
 
Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011
sumit_study
 
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
hritikraj888
 
Recovery techniques
Recovery techniquesRecovery techniques
Recovery techniques
Dr. C.V. Suresh Babu
 
Transaction processing
Transaction processingTransaction processing
Transaction processing
Soumyajit Dutta
 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.ppt
NikhilKumarAgarwalK
 
chp13.pdf
chp13.pdfchp13.pdf
chp13.pdf
cscmsai54
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
Prosanta Ghosh
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processing
Jafar Nesargi
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
Jafar Nesargi
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
Jafar Nesargi
 
Chapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error RecoveryChapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error Recovery
Kunal Anand
 
Transactions
TransactionsTransactions
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
Dr. C.V. Suresh Babu
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
Chetan Mahawar
 
Chapter 4 u
Chapter 4 uChapter 4 u
Chapter 4 u
Sandeep Singh
 
E-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptxE-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptx
thejaswini40
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
Rohit Kumar
 

Similar to Introduction to transaction management (20)

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
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
 
Sistem manajemen basis data 8
Sistem manajemen basis data   8Sistem manajemen basis data   8
Sistem manajemen basis data 8
 
Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011
 
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
 
Recovery techniques
Recovery techniquesRecovery techniques
Recovery techniques
 
Transaction processing
Transaction processingTransaction processing
Transaction processing
 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.ppt
 
chp13.pdf
chp13.pdfchp13.pdf
chp13.pdf
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processing
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 
Chapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error RecoveryChapter-10 Transaction Processing and Error Recovery
Chapter-10 Transaction Processing and Error Recovery
 
Transactions
TransactionsTransactions
Transactions
 
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
 
Chapter 4 u
Chapter 4 uChapter 4 u
Chapter 4 u
 
E-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptxE-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptx
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
 

More from Dr. C.V. Suresh Babu

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
Dr. C.V. Suresh Babu
 
Association rules
Association rulesAssociation rules
Association rules
Dr. C.V. Suresh Babu
 
Clustering
ClusteringClustering
Classification
ClassificationClassification
Classification
Dr. C.V. Suresh Babu
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
Dr. C.V. Suresh Babu
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
Dr. C.V. Suresh Babu
 
DART
DARTDART
Mycin
MycinMycin
Expert systems
Expert systemsExpert systems
Expert systems
Dr. C.V. Suresh Babu
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
Dr. C.V. Suresh Babu
 
Bayes network
Bayes networkBayes network
Bayes network
Dr. C.V. Suresh Babu
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
Dr. C.V. Suresh Babu
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
Dr. C.V. Suresh Babu
 
Rule based system
Rule based systemRule based system
Rule based system
Dr. C.V. Suresh Babu
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
Dr. C.V. Suresh Babu
 
Production based system
Production based systemProduction based system
Production based system
Dr. C.V. Suresh Babu
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
Dr. C.V. Suresh Babu
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
Dr. C.V. Suresh Babu
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
Dr. C.V. Suresh Babu
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
Dr. C.V. Suresh Babu
 

More from Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 

Recently uploaded

Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
Forum of Blended Learning
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
MattVassar1
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
Derek Wenmoth
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 
How to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRMHow to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRM
Celine George
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
Friends of African Village Libraries
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
MattVassar1
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
whatchangedhowreflec
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
Infosec
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
chaudharyreet2244
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
Kalna College
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
MattVassar1
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
MattVassar1
 
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT KanpurDiversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Quiz Club IIT Kanpur
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
yarusun
 

Recently uploaded (20)

Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 
How to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRMHow to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRM
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
 
Erasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES CroatiaErasmus + DISSEMINATION ACTIVITIES Croatia
Erasmus + DISSEMINATION ACTIVITIES Croatia
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
 
Diversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT KanpurDiversity Quiz Finals by Quiz Club, IIT Kanpur
Diversity Quiz Finals by Quiz Club, IIT Kanpur
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
 

Introduction to transaction management

  • 1. Department of Information Technology 1Data base Technologies (ITB4201) Introduction to Transaction concepts Dr. C.V. Suresh Babu Professor Department of IT Hindustan Institute of Science & Technology
  • 2. Department of Information Technology 2Data base Technologies (ITB4201) Action Plan • Transaction processing systems • Introduction to TRANSACTION • Need for TRANSACTION • Operations • Transaction Execution and Problems • Transaction States • Transaction Execution with SQL • Transaction Properties • Transaction Log • Quiz
  • 3. Department of Information Technology 3Data base Technologies (ITB4201) Transaction processing systems • Transaction is a logical unit of work that represents real-world events of any organisation. • Transaction processing systems execute database transactions with large databases and hundreds of concurrent users, for example, • railway and air reservations systems, • banking system, • credit card processing, • stock market monitoring, • super market inventory and • checkouts and so on.
  • 4. Department of Information Technology 4Data base Technologies (ITB4201) Introduction to TRANSACTION • A transaction is a logical unit of work of database processing that includes one or more database access operations. • A transaction can be defined as an action or series of actions that is carried out by a single user or application program to perform operations for accessing the contents of the database. The operations can include – retrieval (Read) – insertion (Write) – deletion and – modification. • A transaction must be either completed or aborted. It can either be embedded within an application program or can be specified interactively via a high- level query language such as SQL. • Its execution preserves the consistency of the database. Each transaction should access shared data without interfering with the other transactions and whenever a transaction successfully completes its execution; its effect should be permanent.
  • 5. Department of Information Technology 5Data base Technologies (ITB4201) Need for TRANSACTION This basic abstraction frees the database application programmer from the following concerns : • Inconsistencies caused by conflicting updates from concurrent users. • Partially completed transactions in the event of systems failure. • User-directed undoing of transactions. • A transaction is a sequence of READ and WRITE actions that are grouped together to from a database access. A transaction may consist of a simple SELECT operation to generate a list of table contents, or it may consist of a series of related UPDATE command sequences.
  • 6. Department of Information Technology 6Data base Technologies (ITB4201) Operations • A transaction can include the following basic database access operations: Operations Descriptions Retrieve To retrieve data stored ina database. Insert To store new data in database. Delete To delete existing data from database. Update To modify existing data in database. Commit To save the work done permanently. Rollback To undo the work done. • Transaction that changes the contents of the database must alter the database from one consistent state to another. • A consistent database state is one in which all data integrity constraints are satisfied. To ensure database consistency, every transaction must begin with the database in a known consistent state.
  • 7. Department of Information Technology 7Data base Technologies (ITB4201) Transaction Execution and Problems • A transaction which successfully completes its execution is said to have been committed. Otherwise, the transaction is aborted. • Thus, if a committed transaction performs any update operation on the database, its effect must be reflected on the database even if there is a failure.
  • 8. Department of Information Technology 8Data base Technologies (ITB4201) Transaction States • A transaction can be in one of the following states:
  • 9. Department of Information Technology 9Data base Technologies (ITB4201) State Description Active state • A transaction goes into an active state immediately after it starts execution, where it can issue READ and WRITE operations. • A transaction may be aborted when the transaction itself detects an error during execution which it cannot recover from, for example, a transaction trying to debit loan amount of an employee from his insufficient gross salary. • A transaction may also be aborted before it has been committed due to system failure or any other circumstances beyond its control. Partially committed • When the transaction ends, it moves to the partially committed state. When the last state is reached. • To this point, some recovery protocols need to ensure that a system failure will not result in an inability to record the changes of the transaction permanently. • Once this check is successful, the transaction is said to have reached its commit point and enters the committed state. Aborted • When the normal execution can no longer be performed. Failed or aborted transactions may be restarted later, either automatically or after being resubmitted by the user as new transactions. Committed • After successful completion of transaction. • A transaction is said to be in a committed state if it has partially committed and it can be ensured that it will never be aborted.
  • 10. Department of Information Technology 10Data base Technologies (ITB4201) Transaction Execution with SQL • The American National Standards Institute (ANSI) has defined standards that govern SQL database transactions. Transaction support is provided by two SQL statements namely COMMIT and ROLLBACK. The ANSI standards require that, when a transaction sequence is initiated by a user or an application program, it must continue through all succeeding SQL statements until one of the following four events occur : • A COMMIT statement is reached, in which case all changes are permanently recorded within the database. The COMMIT statement automatically ends the SQL transaction. The COMMIT operations indicates successful end-of-transaction. • A ROLLBACK statement is reached, in which case all the changes are aborted and the database is rolled back to its previous consistent state. The ROLLBACK operation indicates unsuccessful end-of- transaction. • The end of a program is successfully reached, in which case all changes are permanently recorded within the database. This action is equivalent to COMMIT. • The program is abnormally terminated, in which case the changes made in the database are aborted and the database is rolled back to its previous consistent state. This action is equivalent to ROLLBACK.
  • 11. Department of Information Technology 11Data base Technologies (ITB4201) Transaction Properties A transaction must have the following four properties, called ACID properties (also called ACIDITY of a transaction), to ensure that a database remains stable state after the transaction is executed: • Atomicity. • Consistency. • Isolation. • Durability.
  • 12. Department of Information Technology 12Data base Technologies (ITB4201) Atomicity • The atomicity property of a transaction requires that all operations of a transaction be completed, if not, the transaction is aborted. In other words, a transaction is treated as single, individual logical unit of work. Therefore, a transaction must execute and complete each operation in its logic before it commits its changes. • As stated earlier, the transaction is considered as one operation even though there are multiple read and writes. Thus, transaction completes or fails as one unit. • The atomicity property of transaction is ensured by the transaction recovery subsystem of a DBMS. • In the event of a system crash in the midst of transaction execution, the recovery techniques undo any effects of the transaction on the database.
  • 13. Department of Information Technology 13Data base Technologies (ITB4201) Consistency • Database consistency is the property that every transaction sees a consistent database instance. In other words, execution of a transaction must leave a database in either its prior stable state or a new stable state that reflects the new modifications (updates) made by the transaction. • If the transaction fails, the database must be returned to the state it was in prior to the execution of the failed transaction. • If the transaction commits, the database must reflect the new changes. Thus, all resources are always in a consistent state. • The preservation of consistency is generally the responsibility of the programmers who write the database programs or of the DBMS module that enforces integrity constraints. • A database program should be written in a way that guarantees that, if the database is in a consistent state before executing the transaction, it will be in a consistent state after the complete execution of the transaction, assuming that no interference with other transactions occur. In other words, a transaction must transform the database from one consistent state to another consistent state.
  • 14. Department of Information Technology 14Data base Technologies (ITB4201) Isolation • Isolation property of a transaction means that the data used during the execution of a transaction cannot be used by a second transaction until the first one is completed. • This property isolates transactions from one another. In other words, if a transaction T1 is being executed and is using the data item X, that data item cannot be accessed by any other transaction (T2………..Tn) until T1 ends. • The isolation property is enforced by the concurrency control subsystem of the DBMS.
  • 15. Department of Information Technology 15Data base Technologies (ITB4201) Durability • The durability property of transaction indicates the performance of the database's consistent state. It states that the changes made by a transaction are permanent. • They cannot be lost by either a system failure or by the erroneous operation of a faulty transaction. • When a transaction is completed, the database reaches a consistent state and that state cannot be lost, even in the event of system's failure. • Durability property is the responsibility of the recovery subsystem of the DBMS.
  • 16. Department of Information Technology 16Data base Technologies (ITB4201) Transaction Log (or Journal) To support transaction processing, DBMSs maintain a transaction record of every change made to the database into a log (also called journal). For each transaction, the following data is recorded on the log: A start-of-transaction marker. • The transaction identifier which could include who and where information. • The record identifiers which include the identifiers for the record occurrences. • The operation(s) performed on the records (for example, insert, delete, modify). • The previous value(s) of the modified data. This information is required for undoing the changes made by a partially completed transaction. It is called the undo log. Where the modification made by the transaction is the insertion of a new record, the previous values can be assumed to be null. • The updated value(s) of the modified record(s). This information is required for making sure that the changes made by a committed transaction are in fact reflected in the database and can be used to redo these modifications. This information is called the redo part of the log. In case the modification made by the transaction is the deletion of a record, the updated values can be assumed to be null. • A commit transaction marker if the transaction is committed, otherwise an abort or rollback transaction marker.
  • 17. Department of Information Technology 17Data base Technologies (ITB4201) Test Yourself 1. With regards to transaction processing, any DBMS should be capable of: a. Ensuring that transactions are free from interference from other users. b. Parts of a transaction are not lost due to a failure. c. Transactions do not make the database inconsistent. d. All of the above. 2. What is ACID properties of Transactions? a. Atomicity, Consistency, Isolation, Database b. Atomicity, Consistency, Inconsistent, Durability c. Automatically, Concurrency, Isolation, Durability d. Atomicity, Consistency, Isolation, Durability 3. A transaction completes its execution is said to be a. Saved b. Loaded c. Rolled d. Committed 4. The deadlock state can be changed back to stable state by using _____________ statement. a. Commit b. Rollback c. Savepoint d. Deadlock 5. A transaction for which all committed changes are permanent is called: a. Atomic b. Consistent c. Isolated d. durable
  • 18. Department of Information Technology 18Data base Technologies (ITB4201) Answers 1. With regards to transaction processing, any DBMS should be capable of: a. Ensuring that transactions are free from interference from other users. b. Parts of a transaction are not lost due to a failure. c. Transactions do not make the database inconsistent. d. All of the above. 2. What is ACID properties of Transactions? a. Atomicity, Consistency, Isolation, Database b. Atomicity, Consistency, Inconsistent, Durability c. Automatically, Concurrency, Isolation, Durability d. Atomicity, Consistency, Isolation, Durability 3. A transaction completes its execution is said to be a. Saved b. Loaded c. Rolled d. Committed 4. The deadlock state can be changed back to stable state by using _____________ statement. a. Commit b. Rollback c. Savepoint d. Deadlock 5. A transaction for which all committed changes are permanent is called: a. Atomic b. Consistent c. Isolated d. durable
  翻译: