当前位置:网站首页>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 .
边栏推荐
- [深度学习论文笔记]UCTransNet:从transformer的通道角度重新思考U-Net中的跳跃连接
- FPGA learning notes: vivado 2019.1 add IP MicroBlaze
- “百度杯”CTF比赛 九月场,Web:Upload
- 从外卖点单浅谈伪需求
- RHCSA10
- 百度杯”CTF比赛 2017 二月场,Web:爆破-2
- 精彩速递|腾讯云数据库6月刊
- Apicloud studio3 API management and debugging tutorial
- Personal component - message prompt
- Interviewer soul torture: why does the code specification require SQL statements not to have too many joins?
猜你喜欢
"Baidu Cup" CTF competition in September, web:upload
What are the private addresses
什么是网络端口
What happened to the communication industry in the first half of this year?
Flutter draws animation effects of wave movement, curves and line graphs
The real king of caching, Google guava is just a brother
龙芯派2代烧写PMON和重装系统
Backup and restore of Android local SQLite database
法国学者:最优传输理论下对抗攻击可解释性探讨
Can and can FD
随机推荐
Cloudcompare - point cloud slice
FPGA learning notes: vivado 2019.1 add IP MicroBlaze
MATLAB论文图表标准格式输出(干货)
Matlab paper chart standard format output (dry goods)
Go array and slice
Personal component - message prompt
【 script secret pour l'utilisation de MySQL 】 un jeu en ligne sur l'heure et le type de date de MySQL et les fonctions d'exploitation connexes (3)
#从源头解决# 自定义头文件在VS上出现“无法打开源文件“XX.h“的问题
C object storage
【Hot100】34. Find the first and last positions of elements in a sorted array
一文详解ASCII码,Unicode与utf-8
asp.net 读取txt文件
Can and can FD
Idea set method annotation and class annotation
爱可生SQLe审核工具顺利完成信通院‘SQL质量管理平台分级能力’评测
TortoiseSVN使用情形、安装与使用
LB10S-ASEMI整流桥LB10S
Asemi rectifier bridge hd06 parameters, hd06 pictures, hd06 applications
华为推送服务内容,阅读笔记
面试官灵魂拷问:为什么代码规范要求 SQL 语句不要过多的 join?