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 that enforces data integrity, accuracy, concurrency, and recoverability of the data in the database. The ACID properties of a transaction are…

  • Atomicity – This ties several statements together to ensure that a series of statements in a transaction either succeed or fail together.
  • Consistent – This is enforced by using transaction logs to ensure that only valid data that has been committed will be written to the database.
  • Isolated – This is enforced by using locks to control concurrency. More 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.