System and method for an optimistic database access
First Claim
1. A method for reading data from a database object in a database, wherein the method comprises:
- performing an uncommitted read including an optimistic read of the database object during a transaction, wherein the optimistic read is performed without enforcing consistency requirements of data that is not required to be committed to the database;
executing a first consistency check of the database object to determine whether the data is consistent with the database;
performing a committed read including a first pessimistic read of the database object during the transaction when the first consistency check indicates the data as being inconsistent with the database, wherein the performing of the committed read includes committing the data to the database and allowing concurrent modification of the database object;
executing a second consistency check of the database object to determine whether the data is consistent with the database, in response to the first pessimistic read; and
performing a guaranteed read including a second pessimistic read of the database object during the transaction when the second consistency check indicates the data not being consistent with the database, wherein the performing of the guaranteed read includes committing the data to the database and disallowing concurrent modification of the database object.
2 Assignments
0 Petitions
Accused Products
Abstract
In an embodiment, a database interface performs a three-step optimistic database access. The database interface initially performs an optimistic read of a database object. The database object is checked for consistency after the optimistic read. If the database object is inconsistent, a first pessimistic read is performed with an isolation level that does not guarantee consistency (e.g., with an isolation level of committed read). The database object is checked again for consistency after the first pessimistic read. If the database object is inconsistent, a second pessimistic read is performed with an isolation level that may guarantee consistency (e.g., with an isolation level of repeatable read).
-
Citations
30 Claims
-
1. A method for reading data from a database object in a database, wherein the method comprises:
-
performing an uncommitted read including an optimistic read of the database object during a transaction, wherein the optimistic read is performed without enforcing consistency requirements of data that is not required to be committed to the database; executing a first consistency check of the database object to determine whether the data is consistent with the database; performing a committed read including a first pessimistic read of the database object during the transaction when the first consistency check indicates the data as being inconsistent with the database, wherein the performing of the committed read includes committing the data to the database and allowing concurrent modification of the database object; executing a second consistency check of the database object to determine whether the data is consistent with the database, in response to the first pessimistic read; and performing a guaranteed read including a second pessimistic read of the database object during the transaction when the second consistency check indicates the data not being consistent with the database, wherein the performing of the guaranteed read includes committing the data to the database and disallowing concurrent modification of the database object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A database system having a database, a memory, and a processor coupled to the memory, the database system further having a database interface system including a database interface represented via executable content stored in the memory and executed by the processor to read data from a database object stored in the database, the database interface system comprising:
-
means for performing an uncommitted read including an optimistic read of the database object during a transaction, wherein the optimistic read is performed without enforcing consistency requirements of data that is not required to be committed to the database; means for executing a first consistency check of the database object to determine whether the data is consistent with the database; means for performing a committed read including a first pessimistic read of the database object during the transaction when the first consistency check indicates the data as being inconsistent with the database, wherein the performing of the committed read includes committing the data to the database and allowing concurrent modification of the database object; executing a second consistency check of the database object to determine whether the data is consistent with the database, in response to the first pessimistic read; and means for performing a guaranteed read including a second pessimistic read of the database object during the transaction when the second consistency check indicates the data not being consistent with the database, wherein the performing of the guaranteed read includes committing the data to the database and disallowing concurrent modification of the database object. - View Dependent Claims (18, 19, 20, 21, 22, 23)
-
-
24. A machine-readable storage medium having instructions stored thereon that, when executed by a processor, cause the processor to perform the following operations, comprising:
-
performing an uncommitted read including an optimistic read of the database object during a transaction, wherein the optimistic read is performed without enforcing consistency requirements of data that is not required to be committed to the database; executing a first consistency check of the database object to determine whether the data is consistent with the database; performing a committed read including a first pessimistic read of the database object during the transaction when the first consistency check indicates the data as being inconsistent with the database, wherein the performing of the committed read includes committing the data to the database and allowing concurrent modification of the database object; and executing a second consistency check of the database object to determine whether the data is consistent with the database, in response to the first pessimistic read; and performing a guaranteed read including a second pessimistic read of the database object during the transaction when the second consistency check indicates the data not being consistent with the database, wherein the performing of the guaranteed read includes committing the data to the database and disallowing concurrent modification of the database object. - View Dependent Claims (25, 26, 27, 28, 29, 30)
-
Specification