TRANSACTION IN DBMS & ACID PROPERTY
Q) What is transaction and ACID property
- 1) Transaction is a logical unit of work of database processing or very small unit of program.
2) It can be define as an action or series of action that is carried out by users.
3)These action include retrieval (Read), insertion (Write), deletion and modification.
4) Transaction must be either completed or aborted.
5) If the database is in a consistent state before a transaction executes, then the database should still
be in consistent state after its execution.
6) To maintain consistency in a database, ACID properties must be followed :
ATOMICITY
a)Automicity property of a transaction required that all operations of a transaction be completed, if not, the transaction is aborted.
b) In other words, a transaction is treated as single, logical unit of work.
c)Therefore, a transaction must be execute and complete each operation in its logic before it commits its changes.that means transaction completes or fails as a one unit.
CONSISTENCY
a) Consistency property of the database support every transaction sees a consistent database instance.
b) In consistency, execution of a transaction must leave a database in either its prior stable state or new stable state.
c) If the transaction fails, the database must be returned to the state it was in prior to the execution of the failed transaction.
d) This property ensure that any transaction will bring the database from one valid state to another valid state.
ISOLATION
a) Isolation property of a transaction ensure that data used during the execution of a one transaction cannot be used by a second transaction until the first one is completed.
b)In isolation multiple transaction can occur concurrently without leading inconsistency.
c) In isolation if data item 'X' is used by one transaction T1 then its cannot be accessed by any other transaction(T2... Tn) unit T1 ends.
DURABILITY
a) Durability ensure the performance of the database consistent state.
b) It state that the changes made by a transaction are permanent whatever modification done in database is permanently written in the disk and its does not lost even in system failure occur.
0 comments:
Post a Comment