当前位置:网站首页>Characteristics and isolation level of database
Characteristics and isolation level of database
2022-07-03 06:07:00 【vincentwc】
About the transaction characteristics and isolation level of the database , Always confused and forgotten , I'm going to write an article today to record
One 、 The nature of transactions :ACID
ACID: - Atomicity (Atomicity): A transaction or all execution , Or none of them - Uniformity (Consistency): The integrity of the data before and after the transaction must be consistent - Isolation, (Isolation): Transactions do not interfere with each other - persistence (Durability): Once the transaction is committed , Changes to the database are permanent Two 、 Transaction isolation :
- Dirty reading : It refers to reading the data in another uncommitted transaction during one transaction 【 Read the data of another transaction that has not been committed 】 - It can't be read repeatedly 【 modify 】: For a data in the database , Multiple queries within a transaction range return different data values 【 This is due to the query interval , Modified and committed by another transaction 】 - Fantasy reading / Virtual reading 【 newly added 】: Unreal reading is a phenomenon that occurs when a transaction is not executed independently 【 Such as transaction T1 A data item is removed from all rows in a table “1” It is amended as follows “2” The operation of , When the transaction T2 A row of data items is inserted into the table , And this term is still going to be zero “1” And submit it to the database . And operating transactions T1 If the user views the data that has just been modified , You'll notice that there's still one line that hasn't changed , Actually this row is from the transaction T2 Added in , It's like hallucinating , This is where the phantom reading occurs .】 【 Both phantom and unrepeatable reads read another committed transaction ( This is where the dirty reading is different ), The difference is that the unrepeatable read queries all have the same data item , Phantom reading, on the other hand, targets a whole set of data ( Like the number of Numbers )】
3、 ... and 、 Database isolation level :
- Read uncommitted 【Read uncommitted】: The lowest level , There are no guarantees - Read submitted 【Read committed】: Avoid dirty reading (oracle Default level ) - Repeatable 【Repeatable read 】: Avoid dirty reading , It can't be read repeatedly (mysql Default level ) - Serialization 【Serializable】: Avoid dirty reading 、 It can't be read repeatedly 、 The occurrence of unreal reading Higher isolation level , The less efficient the execution
边栏推荐
- Crontab command usage
- Apt update and apt upgrade commands - what is the difference?
- QT read write excel -- qxlsx insert chart 5
- 最大似然估计,散度,交叉熵
- Mysql database table export and import with binary
- Kubernetes notes (IV) kubernetes network
- 智牛股项目--04
- Disruptor learning notes: basic use, core concepts and principles
- 智牛股项目--05
- When PHP uses env to obtain file parameters, it gets strings
猜你喜欢

CKA certification notes - CKA certification experience post
![[teacher Zhao Yuqiang] Flink's dataset operator](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] Flink's dataset operator

Clickhouse learning notes (2): execution plan, table creation optimization, syntax optimization rules, query optimization, data consistency

Tabbar settings
![[teacher Zhao Yuqiang] kubernetes' probe](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] kubernetes' probe

Skywalking8.7 source code analysis (II): Custom agent, service loading, witness component version identification, transform workflow

项目总结--01(接口的增删改查;多线程的使用)

Kubernetes notes (IV) kubernetes network

Kubesphere - Multi tenant management
![[teacher Zhao Yuqiang] MySQL high availability architecture: MHA](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[teacher Zhao Yuqiang] MySQL high availability architecture: MHA
随机推荐
Convolution operation in convolution neural network CNN
理解 期望(均值/估计值)和方差
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
Tabbar settings
phpstudy设置项目可以由局域网的其他电脑可以访问
BeanDefinitionRegistryPostProcessor
Cesium entity(entities) 实体删除方法
Kubernetes notes (V) configuration management
Oauth2.0 - Introduction and use and explanation of authorization code mode
智牛股项目--04
Why is the website slow to open?
Solve the problem of automatic disconnection of SecureCRT timeout connection
最大似然估计,散度,交叉熵
[teacher Zhao Yuqiang] use the catalog database of Oracle
Installation du plug - in CAD et chargement automatique DLL, Arx
Core principles and source code analysis of disruptor
88. 合并两个有序数组
Jackson: what if there is a lack of property- Jackson: What happens if a property is missing?
Code generator - single table query crud - generator
从 Amazon Aurora 迁移数据到 TiDB