TRANSACTION STATES Database Management System

TRANSACTION STATES Database Management System

TRANSACTION STATES Database Management System

TRANSACTION STATES

TRANSACTION STATES Database Management System : Active: The initial state, the transaction remains in this state during its execution.

Partially Committed: A transaction enters this state from active state after final statement has been executed.

Aborted: A transaction enters this state after it has been ROLLED BACK and database has been restored to a consistent state which existed prior to the commencement of execution of current transaction.

Committed : A transaction enters this state from Partially Committed state after its successful completion.

TRANSACTION STATES Database Management System

State diagram of a Transaction

A Transaction is said to be terminated, if it has either Committed of aborted. When a Transaction has been aborted, System has two options:

  • It can restart the transaction, but only if the transaction was aborted due to Some hardware or software failure and not due error in internal logic of the Transaction. A restarted transaction is called new transaction.
  • (b) It can kill the transaction, if the failure was due internal logic error, which has to be corrected by rewriting of the application program or because the input data was bad or because needed input data was not found in the database.