当前位置:网站首页>Basic characteristics and isolation level of transactions
Basic characteristics and isolation level of transactions
2022-07-05 13:34:00 【51CTO】
The nature of transactions
Transactions are strictly defined , It has to satisfy four characteristics at the same time , namely Atomicity 、 Uniformity 、 Isolation and persistence , It is also known as ACID characteristic , As follows .
1) Atomicity (Atomic)
Said is ⼀ All operations in a transaction are either successful , All or nothing .
2) Uniformity (Consistency)
It means that the database always starts from ⼀ individual ⼀ The state of causation changes to another ⼀ individual ⼀ The state of being sexual .
3) Isolation, (Isolation)
refer to ⼀ Modification of a transaction before final commit , For other matters is not ⻅ Of .
4) persistence (Durability)
refer to ⼀ Once the transaction is committed , The changes will be permanently saved to the database .
The isolation level of the transaction
| Isolation level | Chinese name |
|---|---|
| read uncommint | Read uncommitted |
| read commit | Read submitted |
| repeatable read | Repeatable |
| serializable | Serialization |
- read uncommit Read uncommitted , You may read uncommitted data from other transactions , It's also called Dirty reading .
- ⽤ The user should have read id=1 Of ⽤ Household age Should be 10, As a result, transactions that have not been committed by other transactions are read , Results read results age=20, This is dirty reading .
- read commit Read submitted , The results of two readings are not ⼀ Cause , It's called non repeatable reading . Non repeatable reading solves the problem of dirty reading , He will only read transactions that have been committed .
- ⽤ The user starts transaction reading id=1⽤ Household , Query to age=10,( Other transactions committed ) Read the result again =20, At the same time ⼀ One transaction ⾥ Same as ⼀ A query Reading different results is called non repeatable .
- repeatable read Repeatable , This is a mysql Of Default level , Is that every time you read the result ⼀ sample , But there are May produce unreal reading .
- serializable strand ⾏,⼀ Generally, it won't make ⽤ Of , He will give everyone ⼀⾏ Lock the read data , Meeting Lead to a lot of timeout and lock competition .
边栏推荐
- 一文详解ASCII码,Unicode与utf-8
- redis6事务和锁机制
- How to choose note taking software? Comparison and evaluation of notion, flowus and WOLAI
- RHCSA9
- FPGA learning notes: vivado 2019.1 add IP MicroBlaze
- js判断数组中是否存在某个元素(四种方法)
- Changing JS code has no effect
- What happened to the communication industry in the first half of this year?
- Word document injection (tracking word documents) incomplete
- Idea设置方法注释和类注释
猜你喜欢

Principle and configuration of RSTP protocol

Don't know these four caching modes, dare you say you understand caching?

C# 对象存储
![[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation](/img/70/6de0346df8527af6c88db1ff89947b.png)
[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation

百度杯”CTF比赛 2017 二月场,Web:爆破-2

一网打尽异步神器CompletableFuture

Interviewer soul torture: why does the code specification require SQL statements not to have too many joins?

Operational research 68 | the latest impact factors in 2022 were officially released. Changes in journals in the field of rapid care

What are the private addresses

FPGA learning notes: vivado 2019.1 add IP MicroBlaze
随机推荐
TortoiseSVN使用情形、安装与使用
Usage, installation and use of TortoiseSVN
龙芯派2代烧写PMON和重装系统
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xe6 in position 76131: invalid continuation byt
redis6数据类型及操作总结
Notion 类笔记软件如何选择?Notion 、FlowUs 、Wolai 对比评测
Lb10s-asemi rectifier bridge lb10s
数据泄露怎么办?'华生·K'7招消灭安全威胁
stm32逆向入门
APICloud Studio3 WiFi真机同步和WiFi真机预览使用说明
Go array and slice
js判断数组中是否存在某个元素(四种方法)
这18个网站能让你的页面背景炫酷起来
MySQL get time
Shu tianmeng map × Weiyan technology - Dream map database circle of friends + 1
Apicloud studio3 WiFi real machine synchronization and WiFi real machine preview instructions
【Hot100】34. 在排序数组中查找元素的第一个和最后一个位置
SAE international strategic investment geometry partner
Apicloud studio3 API management and debugging tutorial
leetcode 10. Regular expression matching regular expression matching (difficult)