A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Data Consistency

1 min read
full frame shot of shelf

Photo by Pixabay on Pexels.com

Data Consistency

In Oracle Database, each user must see a consistent view of the data, including visible changes made by a user's own transactions and committed transactions of other users.

For example, the database must prevent the dirty read problem, which occurs when
one transaction sees uncommitted changes made by another concurrent transaction.

Oracle Database always enforces statement-level read consistency, which guarantees that the data that a single query returns is committed and consistent for a single point in time. Depending on the transaction isolation level, this point is the time at which the statement was opened or the time the transaction began.

The Oracle Flashback Query feature enables you to specify this point in time explicitly.

The 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.

Locking Mechanisms

Multi-user databases use some form of data locking to solve the problems associated with data concurrency, integrity, and consistency. Locks are mechanisms used to prevent destructive interaction between users accessing the same resource.

Resources include two general types of objects:

1. user objects, such as tables and rows (structures and data)

2. system objects not visible to users, such as shared data structures in the memory and data dictionary rows