ACID: Refers to the abbreviation for four basic elements that database transactions perform correctly. Contains: atomicity (atomicity), consistency (consistency), isolation (isolation), persistence (durability).
One, database transactions have four features:
1, atomicity: That is, from a debit to B, there is a place error, the revocation of the operation
2, consistency: That is, from a debit to B,a and B total unchanged
3, Isolation: In concurrent data operations, different transactions have different data space, do not interfere with each other
4, Persistence: That is, after the transaction commits, if the database crashes immediately, when the database restarts, the submitted data will be automatically recovered
Two
Iii. 3 main interfaces of the high-level abstraction of a transaction management:
Transaction manager:
Transaction ISOLATION Level: dirty read: One thing reads another thing uncommitted update data is not repeatable READ: One thing reads the updated data submitted by another thing magic read: One thing reads the data inserted by another thing MySQL default thing isolation level: Repatable_read (phantom reads may occur Oracle Default: Read_committed (may appear non-repeatable read and Phantom Read)
Propagation behavior of transactions: Solving the problem of mutual invocation between business layer methods-the problem of how transactions are handled when the Web layer invokes multiple service methods (7 types of 3 classes)
The following diagram is a simple schematic diagram:
The following figure is a specific transaction propagation interface class:
Iv. Spring transaction Management in two ways: