Simple Transaction Model
Simple transaction model is a model of transaction how it must be. It has active, partially committed, failed, aborted, and committed states. Transaction is a several operations that can change the content of the database which is handled by a single program. Simple transaction model follows all ACID properties while doing transactions.
Transaction States:
- Active
- Partially committed
- Failed
- Aborted
- Committed
The above figure describes in this way:
At first, when the transaction is going to operate it is the active state. When the read or write operations occurs, it can be called partially committed states. Finally, after read or write operations, when they use commit operations, they will be committed states meaning the transaction is stored permanently in the database. And when after these both of active states and partially committed states fails, they will fall under the category failed state. Without executing, failed state will rollback which will create the aborted state. Once again, aborted state will be automatically converges into terminated state. Also, after the committed state, the transaction terminates.
In the process of series of operations, read and write operations creates partially committed. That will be stored in local memory or buffer. After, the use of commit statement, data will be moved into permanent storage. This will justify the flow from active to partially committed and to committed state.
On the other hand, in the case of power failure, it will be in failed state. Also, in the partially committed state, in the power failure case, it will be in failed sate. After this, rollback occurs meaning the local memory is cleared. Then aborted occurs meaning the database is unchanged and finally terminated.
If you liked our content Other Topics of Online Contract, then you may also like Normalization.
Leave a Reply