SQL ACID Properties

SQL Server Transactions:

A transaction is a set of T-SQL statements that read and write data into the database.

There are twp types of transactions in SQL Server.

Implicit Transactions: Implicit Transactions are those without begin transaction.
Explicit Transactions: Explicit Transactions are started using Begin transaction and are controlled by using T-SQL command Commit transaction or Rollback transaction.

Any transaction should process ACID properties then only changes move from ldf to mdf.

SQL ACID Properties:

Atomicity: Atomicity means all the statements of a transaction must complete successfully or rolled back completely means either all or no updated.

Consistency: Consistency means a transaction never leaves database half-finished state, whenever any change happen on parent object it should automatically reflect on dependent child object to ensure that database in a consistent state.

Isolation: Isolation keeps changes of incomplete transactions independent from on another.

Durability: Once a transaction is committed, it must be permanent even if there is system failure means it cannot be rollec back.

Powered by k2schools