Transaction are set of commands executed in a small program. Transaction in DBMS must follow ACID( Atomicity, Consistency, Isloation & Durability).
Atomicity ensures that transaction is either completed or roll backed. It wont be partially completed. Consistency ensures that the database must be in consistent state after every transaction. Durability ensures that if data are committed, it should be present in DB. Isolation level makes sure, we read committed data.
Atomicity ensures that transaction is either completed or roll backed. It wont be partially completed. Consistency ensures that the database must be in consistent state after every transaction. Durability ensures that if data are committed, it should be present in DB. Isolation level makes sure, we read committed data.
States of transaction
There are many states within a transaction. It can be either committed, failed or rollback. Lets see the states within a transaction.
Active State
When transaction is being initiated or started.Partially Committed State
When transaction executed its final statement.Failed State
A failed transaction can not proceed further. If any statement fails, it moves to failed state.Aborted State
When transactions fails and recovery manager rollbacks all contents to original state, that state is called as aborted
No comments:
Post a Comment