Data Concurrency and Consistency-Introduction to Data Concurrency and Consistency
2014-05-16 13:35
549 查看
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
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
occur in this transaction, then each statement is consistent to SCN 1000.
In a Flashback Query operation (
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
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 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
SELECTstatement 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
SELECTstatements
occur in this transaction, then each statement is consistent to SCN 1000.
In a Flashback Query operation (
SELECT ... AS OF), the
SELECTstatement 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
employeesand then queries
employeeswill 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.
相关文章推荐
- Introduction to graphs and their data structures Section III[翻译]
- An introduction to Redis data types and abstractions
- An Introduction to Clustered and Non-Clustered Index Data Structures
- Building Applications with Force.com and VisualForce(Dev401)(十六):Data Management: Introduction to Upsert
- Introduction to Data Blocks, Extents, and Segments【每日一译】--2012-10-16
- 11G Concepts(翻译第九章) Data Concurrency and Consistency(数据的并发和并行)
- 数据并发性和一致性介绍--Data Concurrency and Consistency
- Introduction to ADF Data Visualization Components - Graphs, Gauge, Maps, Pivot Table and Gantt
- Introduction to graphs and their data structures Section I[翻译]
- Data Structures and algorithm analysis—1.3. A Brief Introduction to Recursion(数据结构—1.3 递归的简介)(之二)
- Data Structures and algorithm analysis—1.3. A Brief Introduction to Recursion(数据结构—1.3 递归的简介)(之一)
- Introduction to graphs and their data structures Section II[翻译]
- Database Systems: Introduction to Databases and Data Warehouses/Nenad Jukic-图书-亚马逊中国
- Introduction to Process Definition and Process Improvement -by Jim D. Hart
- All you ever wanted to know about Workflow and how it relates to Java, Transactions and Concurrency
- Effective STL:Item 16: Know how to pass vector and string data to
- A Data Access Layer to persist business objects using attributes and reflection - Part III [无常译]
- Introduction to Model Driven Development with AndroMDA
- An introduction to class loading and debugging tools
- A Data Access Layer to persist business objects using attributes and reflection - Part I [无常译]