First, the concept of business
A sequence of operations in a transaction either succeeds or does not.
There are two ways to end a transaction, and when all the steps in the transaction are successfully executed, the transaction commits. If one of the steps fails, a rollback operation occurs, undoing the operation that the transaction has performed.
Second, the characteristics of the business ACID
A transaction has four characteristics: atomicity (atomicity), consistency (consistency), isolation (isolation), and persistence (durability), referred to as ACID properties.
Three, multi-transaction concurrent execution problem
Dirty Reads (drity read): A transaction has updated one copy of the data, another transaction reads the same data at this time, for some reason, the previous rollback operation, the latter will read the data is not correct.
Non-repeatable read (non-repeatable Read): Data inconsistency in two queries for a transaction, which may be the original data that was inserted in the middle of a transaction update during the two query process.
Phantom Read (Phantom Read): In a transaction two times the number of data pens inconsistent, for example, one transaction queried several columns (row) of data, while another transaction at this time inserted a new column of data, the previous transaction in the next query, you will find that there are a few columns of data that it did not previously.
III. four isolation levels for transactions
The SQL standard defines a Class 4 isolation level, which includes specific rules to define which changes within and outside the transaction are visible and which are not. Low-level isolation levels generally support higher concurrency processing and have lower system overhead.
Other related concepts to be supplemented: MySQL, Oracle Transaction Implementation principles, SQL standard
Reference articles
Https://www.2cto.com/database/201707/657145.html
Https://www.cnblogs.com/andydao/p/6043963.html
Four isolation levels for databases