This is the first state of transaction. For example: insertion, deletion or Isubiv updation of record is done here. But data is not saved to database.
Transaction States
AU: May-14,18, Dec.-11,19, Marks 8
Each transaction has following five states:
1) Active: This is the
first state of transaction. For example: insertion, deletion or updation
of record is done here. But data is not saved to database.
2) Partially Committed: When a transaction executes its final operation, it is said
to be in a partially committed state.
3) 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.
4) Aborted: If a transaction is failed to execute, then the database
recovery system will make sure that the database is in its previous
consistent state. If not, it brings the database to consistent state by
aborting or rolling back the transaction.
5) Committed: If a transaction executes all its operations successfully,
it is said to be committed. This is the last step of a transaction, if it
executes without fail.
Example 3.3.1 Define a transaction. Then discuss the following
with relevant examples:
1. A read only transaction 2. A read write
transaction 3. An aborted transaction
Solution:
(1) Read only transaction
(2) A read write transaction
(3)
Review Questions
1. During execution, a transaction passes through
several states, until it finally commits or aborts. List all possible sequences
of states through which transaction may pass. Explain why each state
transaction may occur?AU: May-18, Marks 6
2. With a neat sketch explain the states of
transaction.AU: May-14, Marks 8
3. Brief the states of a transaction with a neat
diagram.AU: Dec 19, Marks 4
Database Management System: Unit III: Transactions : Tag: : Transactions - Database Management System - Transaction States
Database Management System
CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation