What are Transactions?

Transaction ACID Properties

SQL Server Transactions are used to ensure that a series of statements written to modify data will pass the ACID test. They enforce data integrity, accuracy, concurrency, and recoverability of the data in the database. The ACID properties of a transaction are…

  • Atomicity – Ensures that a series of statements in a transaction either succeed or fail together.
  • Consistent – Enforced by using transaction logs. Ensures that only valid data has been committed will be written to the database.
  • Isolated – This is enforced by using locks to control concurrency. Specifically, to make sure that a record being updated by one statement does not interfere with a separate statement trying to modify that same record or records.
  • Durable – Once again transactions logs are used as a way of recovering data in case of a database failure. The recovery model of your database may also affect durability.

To learn more, check out this post on transactions and errors or this post on transaction isolation levels.

Be the first to comment on "What are Transactions?"

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.