当前位置:网站首页>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 .
边栏推荐
- 解决方案:idea project没有显示树状图
- Why is ack=seq+1 when TCP shakes hands three times
- Go replace with local code
- go入门篇 (4)
- Sync.map of go language
- shell中的while循环实例
- [excerpt] [medical image] common DICOM thumbnail interpretation and viewer converter conversion tool
- Firewalld防火墙
- Sword finger offer notes: t57 - ii Continuous positive sequence with sum s
- Finding the finite zero point of transfer function under different sampling periods
猜你喜欢

我在英国TikTok做直播电商

Principle of control system based on feedback rate

解决@OneToMany查询陷入循环引用问题

LNMP architecture setup (deploy discuz Forum)
Unexpected harvest of epic distributed resources, from basic to advanced are full of dry goods, big guys are strong!

go入门篇 (4)

解决方案:Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

Chapter 13 IO flow

SMA TE: Semi-Supervised Spatio-Temporal RepresentationLearning on Multivariate Time Series

严控室外作业时间!佛山住建局发文:加强高温期间建筑施工安全管理
随机推荐
【产品】关于微信产品分析
shell编程之免交互
你尚未连接代理服务器可能有问题或地址不正确(如何查看代理服务器ip)
Shell编程之正则表达式(Shell脚本文本三剑客之grep)
Top 10 in the 5.3 billion Bi Market: fansoft, Microsoft, Yonghong, sap, Baidu, IBM, SAS, smart, salesforce, Inspur soft
解决@OneToMany查询陷入循环引用问题
go语言之sync.Map
Difference quotient approximation of wechat quotient
5V升压9V芯片
STS download tutorial (the solution cannot be downloaded on the include official website)
Go Introduction (2)
You haven't connected to the proxy server. There may be a problem or the address is incorrect (how to check the proxy server IP)
Newticker uses
Finding the finite zero point of transfer function under different sampling periods
The use of omitempty in go
USB network card drive data stream
Sword finger offer notes: T53 - ii Missing numbers from 0 to n-1
Sync.map of go language
Could not load dynamic library ‘libcudnn.so.8‘;
[machine learning whiteboard derivation series] learning notes - support vector machine and principal component analysis