当前位置:网站首页>数据库设计的酸(ACID)碱(BASE)原则
数据库设计的酸(ACID)碱(BASE)原则
2022-08-05 03:26:00 【郝开】
事务
事务是作为单个逻辑工作单元执行的一系列操作,要么完全地执行,要么完全地不执行。
让我们来先看一眼事务的状态机模型。
图为事务的五个阶段
事务必须遵循 ACID 原则。
ACID 酸原则
ACID 是关系型数据库的事务执行过程中,为了保证数据被可靠写入而必须遵循的原则。
Atomicity 原子性
事务的操作要么全部执行,要么全不执行。
Consistency 一致性
在事务开始前和结束后,数据库的完整性约束没有被破坏;但执行过程中允许临时的破坏。
Isolation 隔离性
事务之间互不干扰,一个事务看不到另一事务执行中途的数据变更,也无法与另一事务交互。
Durability 持久性
事务结束后,所作变更将写入数据库,不再被回滚,即使数据库宕机重启。
RDBMS 为了如上四点所述的极高的一致性,而没有强调其扩展性。
BASE 碱原则
Basically Availability 基本可用性
数据库最基本的要求是可用性。
Soft-state 软状态
Soft-state 可视为 stateless 和 stateful 的中间状态。
stateless 指多条请求之间没有上下文联系,这将有助于数据库的简化、扩展和恢复。
stateful 是指同连接的多条请求上下文之间有所联系。
soft-state 一般视为服务器在有限度的资源(一般是时间)内维持上下文,过期则抛弃状态回归默认状态。
Eventually Consistency 最终一致性
允许因延时等出现临时的数据不一致现象,只要数据最终是一致的就可以。
Basically Availability 要注意一点。大概是翻译的问题,将这里的 Basically 翻译成了“基本的”,更接近本意的解释大概是“根本上”。
边栏推荐
- After the large pixel panorama is completed, what are the promotion methods?
- [论文笔记] MapReduce: Simplified Data Processing on Large Clusters
- Ffmpeg - sources analysis
- Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full
- ffmpeg 枚举decoders, encoders 分析
- You may use special comments to disable some warnings. 报错解决的三种方式
- Use CH341A to program external Flash (W25Q16JV)
- How to discover a valuable GameFi?
- rpc-remote procedure call demo
- 用Unity发布APP到Hololens2无坑教程
猜你喜欢

Shell script: for loop and the while loop

QT language file production
![[Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)](/img/10/dafea90158adf9d43c4f025414fef7.png)
[Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)

Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme

冒泡排序与快速排序
![[Software testing] unittest framework for automated testing](/img/80/caedd5cf6dd61c9d75475866613cac.png)
[Software testing] unittest framework for automated testing

In 2022, you still can't "low code"?Data science can also play with Low-Code!

Principle and Technology of Virtual Memory

Flink 1.15.1 Cluster Construction (StandaloneSession)

Why is the pca component not associated
随机推荐
IJCAI2022 | DictBert: Pre-trained Language Models with Contrastive Learning for Dictionary Description Knowledge Augmentation
【已解决】Unity Coroutinue 协程未有效执行的问题
High Item 02 Information System Project Management Fundamentals
Why is the pca component not associated
The usage of try...catch and finally in js
How to discover a valuable GameFi?
2022-08-04 The sixth group, hidden from spring, study notes
Never put off till tomorrow what you can put - house lease management system based on the SSM
2022-08-04 第六小组 瞒春 学习笔记
Shell script: for loop and the while loop
ASP.NET application--Hello World
rpc-remote procedure call demo
开发Hololens遇到The type or namespace name ‘HandMeshVertex‘ could not be found..
.NET Application -- Helloworld (C#)
冰蝎V4.0攻击来袭,安全狗产品可全面检测
Call Alibaba Cloud oss and sms services
2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto
大像素全景制作完成后,推广方式有哪些?
测试薪资这么高?刚毕业就20K
CPDA|How Operators Learn Data Analysis (SQL) from Negative Foundations