`
- 浏览:
6714189 次
- 性别:
- 来自:
武汉
-
ACID properties of transactions ACID 数据库事务标准
In the context of transaction processing, the acronym ACID refers to the four key properties of a transaction: atomicity, consistency,
isolation, and durability.
Atomicity
All changes to data are performed as if they are a single operation. That is, all the changes are performed, or none of them are.
For example, in an application that transfers funds from one account to another, the atomicity property ensures that, if a debit is made successfully from one account, the corresponding credit is made to the other account.
Consistency
Data is in a consistent state when a transaction starts and when it ends.
For example, in an application that transfers funds from one account to another, the consistency property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction.
Isolation
The intermediate state of a transaction is invisible to other transactions. As a result, transactions that run concurrently appear to be serialized.
For example, in an application that transfers funds from one account to another, the isolation property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither.
Durability
After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure.
For example, in an application that transfers funds from one account to another, the durability property ensures that the changes made to each account will not be reversed.
ACID,指数据库事务正确执行的四个基本要素的缩写.包含:原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)。一个支持事务(Transaction)的数据库系统,必需要具有这四种特性,否则在事务过程(Transaction processing)当中无法保证数据的正确性,交易过程极可能达不到交易方的要求.
原子性
整个事务中的所有操作,要么全部完成,要么全部不完成,不可能停滞在中间某个环节。事务在执行过程中发生错误,会被回滚(Rollback)到事务开始前的状态,就像这个事务从来没有执行过一样。
一致性
在事务开始之前和事务结束以后,数据库的完整性约束没有被破坏。
隔离性
两个事务的执行是互不干扰的,一个事务不可能看到其他事务运行时,中间某一时刻的数据。
持久性
在事务完成以后,该事务所对数据库所作的更改便持久的保存在数据库之中,并不会被回滚。
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Use multi-document ACID transactions in MongoDB ,在MongoDB 4.0中使用多文档ACID事务
Intelligent monitoring and fault management for muscle relaxation anaesthesia
Preparation of Papers for IEEE TRANSACTIONS and JOURNALS,Instructions Only,IEEE投稿通用模板,IEEE投稿必读
This book talks about Principles of Transactions
Preparation of Papers for IEEE TRANSACTIONS and JOURNALS, IEEE投稿通用模板,IEEE投稿必读
#sqlite3-transactions 向添加事务支持。背景Node-sqlite3 是一... Sqlite3-transactions 通过在事务中透明地锁定数据库来解决这个问题。 如果数据库被锁定,所有不属于该事务的查询都会在事务完成后排队并执行。 作为
数据库管理系统:ch15 Transactions.ppt
在执行增删改语句(产生事务日志)的过程中提示,The transaction log for database ‘***’ is full due to ‘REPLICATION'(数据库“***”的事务日志已满,原因为“REPLICATION”). CDC以及复制的基本原理粗略地讲...
数据库系统英文课件:ch15 Transactions.pptx
TPS : Transactions Per Second 是事务数/秒,是一台数据库服务器在单位时间内处理的事务的个数。 在对数据库的性能监控上经常会提到QPS和TPS这两个名词,下面就分别简单的分享一下关于MySQL数据库中的QPS和TPS的...
sails-mysql-transactions, 带有mySQL事务支持的帆/水线 ORM 带有复制支持的MySQL事务性 ORMsails-mysql-transaction 是用于MySQL的船帆ORM适配器,具有事务和复制群集支持。这个适配器在流行的sails-mysql 适配器...
Distributed Transactions in MySQL 分阶段提交事务
(atomicity, consistency, isolation) properties of transactions provide a foundation to ensure that con- current reads and writes of shared data do not produce inconsistent or incorrect results. At a ...
atomikos本身支持使用两段提交协议在一个项目中,管理多个数据库事务,如mysql的事务,和符合JMS规范的多个消息事务,如activemq的事务。但是现在因为微服务框架的流行使得多个数据库的事务不在一个项目内,使得一个...
Oracle自治事务的介绍(Autonomous_Transactions)PRAGMA_AUTONOMOUS_TRANSACTION
django-celery-transactions django-celery-transactions保留Celery任务,直到提交了当前数据库事务为止,避免了Celery 所述的潜在竞争情况。 从信号处理程序发送任务,不用担心!特征如果回滚事务,则将丢弃任务。 ...
数据库系统概念(杨冬青)习题答案Chapter 1 provides a general overview of the nature and purpose of database systems. The most important concept in this chapter is that database systems allow data to ...
Memory OLTP engine works, how it stores and manipulates data, and how, even with all data stored in memory and no locking or latching, it can still guarantee the ACID properties of all transactions. ...