当前位置:网站首页>事务四大特性(ACID):
事务四大特性(ACID):
2022-07-27 12:32:00 【涟涟涟涟】
一、原子性(Atomicity)
化学中的原子指不可再分的基本微粒,数据库中原子性强调事务是一个不可分割的整体,事务开始后所有操作要么全部成功,要么全部失败,不可能停滞在中间某个环节。如果事务执行过程中出错就会回滚到事务开始前的状态,所有的操作就像没有发生一样不会对数据库有任何影响。
二、一致性(Consistency)
事务必须使数据库从一个一致性状态变换到另一个一致性状态,即一个事务执行之前和执行之后都必须处于一致性状态。拿转账来说,假设用户A和用户B两者的钱加起来一共是5000,那么不管A和B之间如何转账,转几次账,事务结束后两个用户的钱相加起来应该还是5000,这就是事务的一致性。
三、隔离性(Isolation)
当多个用户并发访问数据库时,比如操作同一张表时,数据库为每一个用户开启的事务,不能被其他事务的操作所干扰,多个并发事务之间要相互隔离,比如A正在从一张银行卡中取钱,在A取钱的过程结束前,B不能向这张卡转入钱。
四、持久性(Durability)
一个事务一旦被提交,则对数据库的所有更新将被保存到数据库中,不能回滚。
边栏推荐
- 严控室外作业时间!佛山住建局发文:加强高温期间建筑施工安全管理
- Keil mdk5.37 and above can add AC5 (armcc) compiler by themselves
- Guangdong: fire safety supervision is no longer "absent" in new industries and new formats such as script killing
- While loop instance in shell
- Conversion between multiple bases
- MySQL common commands
- Write and read system temporary files: createtempfile and tempfilecontent[easy to understand]
- About offline caching application cache / using manifest file caching
- Necessary foundation: Signature Verification
- Insert sort summary
猜你喜欢

CMD Chinese garbled code solution

Shutter project scrollcontroller attached to multiple scroll views, failed assertion: line 109 POS 12 error handling

Why does MySQL index use b+ tree instead of jump table?

II. Analysis of the execution process of make menuconfig

Wechat applet session holding

Fundamentals of mathematics 01

Shake quickly to rescue the "frustrated person"

The strongest distributed locking tool: redisson

2021-3-22-directed graph sorting

XXL job parameter transfer
随机推荐
20210422 consolidation interval
Conversion between multiple bases
开关量输入输出模块DAM-5055
Chapter 8 multithreading
Lonely young people can't quit jellycat
Multi activity disaster recovery construction after station B 713 accident | takintalks share
Data Lake (20): Flink is compatible with iceberg, which is currently insufficient, and iceberg is compared with Hudi
Unity 2D game tutorial
B 站 713 事故后的多活容灾建设|TakinTalks 大咖分享
A personal blog integrating technology, art and sports.
The bank's face recognition system was broken: a depositor was stolen 430000 yuan
The strongest distributed locking tool: redisson
Kazoo tutorial
Use redis' sorted set to make weekly hot reviews
POJ1611_The Suspects
2021-3-22-tencent - minimum number of guards
I/O实例操作
SQL question brushing: find out the current salary of all employees
P1876 turn on the light [getting started]
Go Beginner (3)