Transaction State Diagram
Transaction State Diagram Let us understand all the states in terms of stages in detail: Stage-1: Once a transaction becomes active it starts its execution and goes to active state . It chooses read or write operations in this stage and stays here till the transaction is executed. Stage-2: Once the read and write operation completes successfully, the transaction then goes to partially committed state, where all the read and write operations are performed on the local memory instead of actual database. The reason for having this state is that, the transaction may fail during execution, and may lead actual database instead of local memory, in an inconsistent state in case of failure. So having this state can help us rollback the changes made to the database in case of execution failure. Stage-3: Then, it is responsibility of recovery protocol, to ensure that a system failure will not disable permanent changes to the database. It any failure occurs either ...