DB Transaction in DBMS
DB Transaction in DBMS
The transaction has the four properties. These are used to maintain
consistency in a database, before and after the transaction.
Property of Transaction
1. Atomicity
2. Consistency
3. Isolation
4. Durability
Atomicity
It states that all operations of the transaction take place at
once if not, the transaction is aborted.
Abort: If a transaction aborts then all the changes made are not
visible.
T1 T2
Read(A) Read(B)
A:= A-100 Y:= Y+100
Write(A) Write(B)
Consistency
The integrity constraints are maintained so that the
database is consistent before and after the transaction.
Isolation
It shows that the data which is used at the time of execution
of a transaction cannot be used by the second transaction
until the first one is completed.
States of Transaction
o
o
Active state
o Partially committed
Committed
Failed state
o Aborted