Labels

Wednesday, 27 July 2016

ACID properties in SQL Server

ACID Properties is one of the most popular interview question. Moreover, I strongly believe that every software developer as well as database administrator should know the answer to this question. When you design any system or database, make sure you select the database which follows these properties as that will help you to develop better applications for your business needs.

A Transaction is a group of database commands that are treated as a single unit.A successful transaction must pass the "ACID" test i.e it should pass Atomic,Consistent,Isolation and Durability.

Atomic: Either Transaction completes or rolled back

All statements in the transaction either completed successfully or they were all rolled-back. The tasks that the set of operations represents is either accomplished or not but in any case not left half-done.

Consistent : Guarantees committed transaction state

Consistency guarantees that a transaction never leaves your database in a half-finished state.


Isolation : Transactions are independent

Isolation keeps transactions separated from each other until they’re finished.For this databases use locking mechanism to maintains transaction isolation.

Durability : Committed data never lost

Durability guarantees that the database will keep track of pending changes in such a way that the server can recover from an abnormal termination i.e system error or power failure.


No comments:

Post a Comment