Transaction Properties


Transaction / Acid Properties

The ACID property is elaborated as mentioned below:

A  - Atomicity
The execution of entire transaction should take place at once or not at all.
      Either the entire transaction takes place at once or doesn’t happen at all, i.e. the transaction never occurs partially. 
      Each transaction is considered as one unit and either runs to completion or is not executed at all. It involves the following two operations:
      - Abort: If a transaction aborts, changes made to database are not visible.
- Commit: If a transaction commits, changes made are visible.
      Atomicity is also known as the ‘All or nothing rule’.

C  - Consistency
The database must remain consistent before and after the execution of transaction.
      The database must remain in a consistent state after any transaction.
      No transaction should have any adverse effect on the data residing in the database.
      If the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well.

I   - Isolation
Transactions executing concurrently should remain independent and not get affected by each other. 
      In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system is being executed.
      No transaction should affect the existence of any other transaction.

D  - Durability
The successful transactions are reflected even if there is system failure.
      The database should be durable enough to hold all its latest updates even if the system fails or restarts.
      If a transaction updates a chunk of data in a database and commits, then the database will hold the modified data.
      If a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action.

Comments

Popular posts from this blog

Transaction State Diagram

Normalization – 1NF, 2NF, 3NF, BCNF and 4NF

Introduction to transaction