Computer Science, asked by khushboo2295, 1 year ago

What is transaction ? Explain the states of transaction with the help of diagram.

Answers

Answered by robinbittu1
0
this is my answer hope it will help you
Attachments:
Answered by sriti88
0

A transaction is the sequence of one or more SQL statements that are combined together to form a single unit of work.

States of Transactions

A transaction in a database can be in one of the following states −

Active − In this state, the transaction is being executed. This is the initial state of every transaction.

Partially Committed − When a transaction executes its final operation, it is said to be in a partially committed state.

Failed − A transaction is said to be in a failed state if any of the checks made by the database recovery system fails. A failed transaction can no longer proceed further.

Aborted − If any of the checks fails and the transaction has reached a failed state, then the recovery manager rolls back all its write operations on the database to bring the database back to its original state where it was prior to the execution of the transaction. Transactions in this state are called aborted. The database recovery module can select one of the two operations after a transaction aborts −

Re-start the transaction

Kill the transaction

Committed − If a transaction executes all its operations successfully, it is said to be committed. All its effects are now permanently established on the database system.

Hope it helps....

Attachments:
Similar questions