当前位置:网站首页>Transaction characteristics and isolation levels
Transaction characteristics and isolation levels
2022-06-13 01:20:00 【Torlesse】
Transaction characteristics and isolation levels
Transaction features
Atomicity 、 Uniformity 、 persistence 、 Isolation,
- Atomicity (Atomicity) Atomicity means that a transaction is an indivisible unit of work , Either the operations in the transaction occur , Or none at all .
- Uniformity (Consistency) The integrity of the data before and after the transaction must be consistent .
- persistence (Durability) Persistence means that once a transaction is committed , It changes the data in the database permanently , Next, even if the database fails, it should not have any impact .
- Isolation, (Isolation) Transaction isolation refers to when multiple users operate the database concurrently , The transaction of one user cannot be interfered by the transactions of other users , Data between multiple concurrent transactions should be isolated from each other . Simply speaking : Transactions do not interfere with each other
Transaction concurrency
1、 Dirty reading : Business A Read transaction B Updated data , then B Rollback operation , that A The data read is dirty
2、 It can't be read repeatedly : Business A Read the same data multiple times , Business B In the transaction A During multiple reads , The data has been updated and submitted , Cause transaction A When reading the same data multiple times , result atypism .
3、 Fantasy reading : System administrator A Change the scores of all students in the database from specific scores to ABCDE Grade , But the system administrator B At this time, a specific score record was inserted , When the system administrator A After the change, I found that there is another record that hasn't been changed , It's like an illusion , This is called Unreal reading .
Isolation level
| Level | name | Isolation level | Dirty reading | It can't be read repeatedly | Fantasy reading | Database default isolation level |
|---|---|---|---|---|---|---|
| 1 | Read uncommitted | read uncommitted | yes | yes | yes | |
| 2 | Read submitted | read committed | no | yes | yes | Oracle |
| 3 | Repeatable | repeatable read | no | no | yes | MySQL |
| 4 | Serialization | serializable | no | no | no |
边栏推荐
- Pipeline pipeline project construction
- 5G工业网关在煤矿行业的应用优势
- Common skills for quantitative investment - indicators Chapter 3: detailed explanation of RSI indicators, their code implementation and drawing
- MySQL index
- How to handle different types of data
- Detailed explanation of Joseph problem
- Happy string
- C language implementation of the classic eight queens problem
- Leetcode find duplicates
- HashSet underlying source code
猜你喜欢

DFS and BFS notes (II): depth first search (implemented in C language)

MySQL related summary

spiral matrix visit Search a 2D Matrix

论文笔记:STMARL: A Spatio-Temporal Multi-AgentReinforcement Learning Approach for Cooperative Traffic

Rasa dialogue robot helpdesk (III)

FLIP动画实现思路

生态聚合NFT来袭,Metaverse Ape引领Web 3.0元宇宙新范式革命

How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of BBI, MTM, obv, CCI and priceosc indicators

Plusieurs catégories de tests logiciels sont claires à première vue

Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
随机推荐
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of DBCD, ROC, vroc, Cr and psy index strategy income
【斯坦福计网CS144项目】Lab1: StreamReassembler
Opencv desaturation
关于#数据库#的问题,如何解决?
Pysmb usage
Calculate sentence confusion ppl using Bert and gpt-2
The tle4253gs is a monolithic integrated low dropout tracking regulator in a small pg-dso-8 package.
Pipeline流水线项目构建
Tkinter library installation
Rotating camera
np.concatenate中axis的理解
[Latex] 插入圖片
在国企做软件测试工程师是一种什么样的体验:每天过的像打仗一样
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
What kind of experience is it to be a software test engineer in a state-owned enterprise: every day is like a war
軟件測試的幾種分類,一看就明了
Redis usage optimization summary learning
My crawler learning notes
MySQL performance analysis - explain
Memory learning book reference