First,
What is a thing
A program execution unit that accesses and possibly updates various data items in a database
Second, The role of things
To ensure consistency of data
Third, Four characteristics of things
Atomicity: A sequence of steps in a thing that is either executed or not executed
Consistency: Data in a database remains consistent before and after things are executed
Isolation: When multiple things access the same data at the same time, the effect of one thing on another
Persistence: When things are submitted or rolled back, the impact on the data is permanent, and any device failure or power outage will not affect the data retention
Four, The things in MySQL
1. Read Uncommit
It is possible to read data that is not submitted by another thing in one thing, which can produce dirty reads
2. Read commit(non-repeatable)
In one thing, it is impossible to read data that is not yet submitted by another thing, it is possible to read different data two times, so it becomes non-repeatable read
3. reapeatable Read(Repeatable read)
In one thing, even if another thing modifies the data and commits it, this thing still does not see the change of the data, unless this time the thing commits, opens a new thing
4. Serializable(serialized access)
When the database is in one thing, other things do not work on the database, must wait for things to commit or rollback, other things can be normal execution
Five, The things in the Orcale
1. Read Committed
In one thing, it is impossible to read data that has not yet been submitted by another thing, it is possible to read different data two times, so it becomes non-repeatable read ( same as MySQL)
2. Serializable
its role is only repeatable reading, equivalent to the third level in MySQL
Things in the database