Objective
SQL Server, as an excellent relational database, is supported by a variety of concurrent operations and user access in addition to supporting the most basic data storage capabilities.
And this series of content will be a layer of analysis of the SQL Server in the ecological environment, is how to maintain the order of various access through a series of mechanisms, as the saying goes: "There is a lake, there are lakes and rivers and rivers and lakes," the same in the world of SQL Server, also has its own " If you do not play according to the rules, then you will be kicked out!
The same series will be analyzed to meet a variety of problems of the solution, for the reference of the hospital friends.
As the first article, first of all the same first to mention the foundation, and then talk about the problems arising.
This article mainly introduces the properties of the transaction, about the transaction is actually a cliché, a little bit of basic friends know, but here is to repeat it again.
Technical preparation
Based on the SQL Server2012 version.
Concept Introduction
A transaction is a series of operations performed as a single logical unit, and the operation of the database is based on the stacking of these logical units. Each logical unit must have 4 properties: atomicity, consistency, isolation, and persistence, so that it can become a transaction.
The above is what we usually call (ACID).
The so-called atomicity is that a transaction must be an atomic unit of work, meaning its operability is not indivisible.
Simply put: the so-called transactional operations are either all executed, or none are executed, there is no ambiguity operation!
This is very good understanding: for example, you go to modify the database data, to modify 100 records, or 100 are not modified, or will be modified, there is no modification of the part and the other part of the situation has not changed.
In SQL Server, each individual statement can be considered to be contained by default in a transaction, where the concept is implicit transactions, where each transactional operation completes or rolls back to the initial value state.
Mention here if the volume of data is large, such as many of the job requirements mentioned in the "massive data", this one attribute has a great "thunder"! ...... analysis behind the article
When a transaction is complete, it is necessary to keep all data in a consistent state.
SQL Server high Concurrency Problem series Basics (talking about properties of transactions)