Data Concurrency and Consistency-Introduction to Data Concurrency and Consistency
来源:互联网 发布:flash游戏制作软件 编辑:程序博客网 时间:2024/05/17 07:12
Data Concurrency:确保用户能够同时访问数据。
Data Consistency:确保每个用户看到数据的一致性视图,包括用户自己对数据库的改变和其他用户commit之后的数据。
Oracle Database maintains data consistency by using a multiversion consistency model and various types oflocks andtransactions.
1、Mulitversion Read Consistency
Oracle Database maintains multiversion read consistency, which means that database queries have the following characteristics:
a、Read-consistent queries
查询返回的数据是已经提交过的,并且和某个时间点的数据是一致的。
Oracle database不允许dirty reads,dirty read发生在一个transaction读取了另一个transaction未提交的数据。
b、Nonblocking queryies
Readers and writers of data do not block one another。
1.1Statement-Level Read Consistency(语句级读一致性)
Oracle Database always enforces statement-level read consistency.
In the read committed isolation level, this point is the time at which the statement was opened. For example, if a
SELECT
statement opens at SCN 1000, then this statement is consistent to SCN 1000.In a serializable or read-only transaction this point is the time the transaction began. For example, if a transaction begins at SCN 1000, and if multiple
SELECT
statements occur in this transaction, then each statement is consistent to SCN 1000.In a Flashback Query operation (
SELECT ... AS OF
), theSELECT
statement explicitly specifies the point in time. For example, you can query a table as it appeared last Thursday at 2 p.m.
1.2Transaction-Level Read Consistency(事务级读一致性)
Oracle Database can also provide read consistency to all queries in a transaction, known as transaction-level read consistency. In this case, each statement in a transaction sees data from the same point in time, which is the time at which the transaction began.
Queries made by a serializable transaction see changes made by the transaction itself. For example, a transaction that updates employees
and then queriesemployees
will see the updates. Transaction-level read consistency 不会产生幻读。
1.3Read Consistency and Undo Segments
当一个表同时被查询和更新的时候,数据库create a read-consistent set of data来管理多版本读一致性。Oracle Database achieves this goal through undo data.
当用户改变数据的时候,数据库创建undo entries(这些数据被写入undo segments)。The undo segments contain the old values of data that have been changed by uncommitted or recently committed transactions.
Read consistency is guaranteed in single-instance and Oracle Real Application Clusters (Oracle RAC) environments. Oracle RAC uses a cache-to-cache block transfer mechanism known as Cache Fusion to transfer read-consistent images of data blocks from one database instance to another.
- Data Concurrency and Consistency-Introduction to Data Concurrency and Consistency
- 13 Data Concurrency and Consistency
- 数据并发性和一致性介绍--Data Concurrency and Consistency
- Data Consistency Primer
- Linearizability and Sequential Consistency
- Transactions and Consistency
- TARDiS:A Branch-and-Merge Approach To Weak Consistency
- Introduction to Concurrency Theory- Transition Systems and CCS.pdf 英文原版 免费下载
- Distributed System 笔记 - Consistency 和 Data replication
- An introduction to Java-concurrency
- Concurrency and Race Condition
- Controller and Concurrency
- DML and Concurrency
- Concurrency and Race Conditions
- Concurrency, Goroutines and GOMAXPROCS
- 18 Concurrency and Synchronization
- Core data/MagicalRecord Concurrency Reseach
- Learning with Local and Global Consistency
- guava中String的CharMatcher
- GBK与UTF8编码互转的C++版
- Android中文件名长度限制
- 计算机视觉相关库
- 复数矩阵计算行列式
- Data Concurrency and Consistency-Introduction to Data Concurrency and Consistency
- ios开发 CocoaPods管理本地库
- 不借助其它变量交换两变量值的三种算法
- 文件上传利器SWFUpload入门简易教程
- cocos2d-x 3.0 touch事件官方解释
- 关于聚类分析、判别分析、主成分分析、因子分析等多元统计分析方法
- Git with Smart HTTP in Cygwin
- 圆柱体求表面积
- html target属性