Acid Properties in RDBMS



ACID properties are defined as Atomicity, consistency, isolation, durability. Sql server follow these properties religiously. If these properties were not followed can cause database crash.

Atomicity: 


  1. It is an all-or-none proposition. 
  2. It states that database modifications must follow an “all or nothing” rule. 
  3. Each transaction is said to be “atomic.” 
  4. If one part of the transaction fails, the entire transaction fails.


Consistency: 


  1. This states that only valid data will be written to the database. 
  2. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.
  3. The database must be in a consistent state both before the transaction begins and after the transaction has completed, irrespective of whether the transaction was a success (and therefore committed) or a failure 

   Example :
If an insert violates a check constraint or the referential integrity of the table in question, then the transaction must be rolled back or a compensating action 

Isolation: 


  1. This keeps transactions separated from each other until they’re finished. 
  2. It requires that multiple transactions occurring at the same time not impact each other’s execution.  
  3. The isolation property does not ensure which transaction will execute first, merely that they will not interfere with each other


Durability: 


  1. It guarantees that the database will keep track of pending changes in such a way that the server can recover from an abnormal termination. 
  2. It ensures that any transaction committed to the database will not be lost. 
  3. Durability is ensured through the use of database backups and transaction logs that facilitate the restoration of committed transactions in spite of any subsequent software or hardware failures


No comments:
Write comments

Please do not enter spam links

Meet US

Services

More Services