?

Log in

Previous Entry | Next Entry

ACID are set of properties that guarantee that database transactions are processed reliably.
Let’s talk about every property in detail

1) Atomicity
It says, Database transaction should complete 100% or zero. Example – let’s say there is a transaction which has two steps. Let say one of them complete and power will fail. It is must that even step 1 should rollback or else it is said that Atomicity is violated.

2) Consistency
This property ensures that database transaction will bring database from one valid state to another.
It means only valid data will be written to database. Valid data means which won’t violate any constraints and business rules.


3) Isolation
Every Transaction should be independent of each of other.
It means if two transactions are trying to access the same data and are trying to execute at the same time then one should wait until other ends or else it said that Database is violating Isolation.

4) Durability
Changes need to persist permanently once transaction is termed as successful.
Let say a transaction has 2 steps to complete and both of them executes and completes. Now it time to commit changes to real database. Let say even after success, final commit it not made and waiting for something else to happen (like waiting for memory to get cleaned) and in the meantime power fails. It will make us lost all the changes. Thus we say transaction was not durable. To make it durable we should commit it as soon as we realize that it completes.

How will you make sure that Sql transactions obey ACID properties?
For that transactional statements are there in sql like Begin Transaction, Commit Transaction and Rollback Transaction.

We are thankful to questpond.com to provide this ACID .NET Interview question with answers.
Copy right www.questpond.com

Buy 600+ Real Time Interview Videos

Call +91-22-66752917 or mail us on questpond@questpond.com for more details on C#, .NET, ASP.NET, SQL Server interview question videos.

SQL Server interview question videos

Latest Month

January 2017
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Tags

Powered by LiveJournal.com