1. Back To Blog

SQL Server interview questions: - What are ACID fundamental and transactions in SQL SERVER?

SQL Server interview questions: - What are ACID fundamental and transactions in SQL SERVER?

A transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties, called the ACID (Atomicity, Consistency, Isolation, and Durability) properties, to qualify as a transaction:

Atomicity

  • A transaction must be an atomic unit of work; either all of its data modifications are performed or none of them is performed.

Consistency

  • When completed, a transaction must leave all data in a consistent state. In a relational database, all rules must be applied to the transaction's modifications to maintain all data integrity.

Isolation

  • Modifications made by concurrent transactions must be isolated from the modifications made by any other concurrent transactions. A transaction either see data in the state it was before another concurrent transaction modified it, or it sees the data after the second transaction has completed, but it does not see an intermediate state. This is referred to as serializability because it results in the ability to reload the starting data and replay a series of transactions to end up with the data in the same state it was in after the original transactions were performed.

Durability

  • After a transaction has completed, its effects are permanently in place in the system. The modifications persist even in the event of a system failure.

A small demo video on Optimistic Locking.

Also get revised with most asked SQL Server Interview Questions with below 1 hour tutorial :-


Get our more tutorials on SQL server interview questions | View author's blog on SQL server interview questions

Shiv Prasad Koirala

Visit us @ www.questpond.com or call us at 022-66752917... read more

We are on Social