当前位置:网站首页>Transactions in MySQL
Transactions in MySQL
2022-07-27 12:16:00 【Canghai light boat 690】
One 、 The basic elements of a business (ACID)
1、 Atomicity (Atomicity): All operations after the transaction begins , Or all of them , Or not at all , It's impossible to stay in the middle . An error occurred during the execution of the transaction , It rolls back to the state it was in before the transaction started , All the operations are as if they didn't happen . That is to say, a business is an indivisible whole , It's like atoms in chemistry , Is the basic unit of material composition .
2、 Uniformity (Consistency): Before and after the transaction starts , The database integrity constraint is not broken . such as A towards B Transfer accounts , impossible A Buckle the money ,B Has received .
3、 Isolation, (Isolation): At the same time , Only one transaction is allowed to request the same data , There is no interference between the different transactions . such as A Withdrawing money from a bank card , stay A Before the withdrawal process is over ,B You can't transfer money to this card .
4、 persistence (Durability): After the transaction completes , All updates to the database by the transaction are saved to the database , Cannot be rolled back .
Two 、 Concurrency of transactions
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 .
边栏推荐
- Ali II: what if the AOF file in redis is too large?
- Principle of PWM and generation of PWM wave
- Conversion between multiple bases
- Multi activity disaster recovery construction after station B 713 accident | takintalks share
- matlab二分法例题(用二分法求零点例题)
- Chapter 12 generics
- Wilcoxon rank sum and signed rank
- MySQL paging query instance_ MySQL paging query example explanation "suggestions collection"
- 【产品】关于微信产品分析
- Newton Raphson iterative method
猜你喜欢
Do you really understand the underlying data structure skip list of Zset in redis?

Shake quickly to rescue the "frustrated person"

上半年火灾起数下降27.7%,广东将这样提升全民消防安全素质

Image segmentation vs Adobe Photoshop (PS)

Finding the finite zero point of transfer function under different sampling periods

In the first half of the year, the number of fires decreased by 27.7%. Guangdong will improve the fire safety quality of the whole people in this way

LNMP architecture setup (deploy discuz Forum)

严控室外作业时间!佛山住建局发文:加强高温期间建筑施工安全管理
![[product] about wechat product analysis](/img/b2/e1b32e86e2c991ae5c8f8a71f692fe.png)
[product] about wechat product analysis

Introduction to box diagram
随机推荐
iptables防火墙
One article to understand the index of like in MySQL
Strictly control outdoor operation time! Foshan housing and Urban Rural Development Bureau issued a document: strengthening construction safety management during high temperature
Go Beginner (5)
Synchronous use reference of the new version of data warehouse (for beginners)
go 用本地代码replace
While loop instance in shell
Conversion between multiple bases
Shell脚本文本三剑客之sed
Image segmentation vs Adobe Photoshop (PS)
广东财政多举措助力稳住粮食安全“压舱石”
JS string method summary
严控室外作业时间!佛山住建局发文:加强高温期间建筑施工安全管理
Shell script text three swordsmen sed
Detailed explanation of deeplab series (simple and practical annual summary)
Newton Raphson iterative method
Difference quotient approximation of wechat quotient
Check the number of file descriptors opened by each process under the system
The difference between microcomputer and single chip microcomputer
Wilcoxon rank sum and signed rank