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.
This property ensures that database transaction will bring database from one valid state to another.
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.
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.
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.