Book Image

SQL Server 2014 Development Essentials

By : Basit A. Masood-Al-Farooq
Book Image

SQL Server 2014 Development Essentials

By: Basit A. Masood-Al-Farooq

Overview of this book

Table of Contents (14 chapters)
SQL Server 2014 Development Essentials
About the Author
About the Reviewers

The fundamentals of transactions

A transaction is a logical unit of work made up of one or more tasks. In general, a transaction is considered to have four primary characteristics: atomicity, consistency, isolation, and durability (ACID). The following is a brief explanation of these characteristics:

  • Atomicity: The transaction is an atomic unit of work in which every task within that transaction must be completed

  • Consistency: The transaction must leave all of the data in a consistent state

  • Isolation: The changes made by concurrent transactions must be isolated from each other, which means that no transaction should find data in an indeterminate state (in the process of change)

  • Durability: The changes made by the transaction are persisted

In SQL Server, the transaction log makes ACID transactions possible. This is because SQL Server first writes the transactions to the transaction log, and after that, it writes committed transactions to the data file. In the case of a system failure, SQL Server...