Data processing: database and file management or data structures – Database design – Data structure types
Reexamination Certificate
2000-12-14
2004-04-06
Amsbury, Wayne (Department: 2171)
Data processing: database and file management or data structures
Database design
Data structure types
C707S793000, C707S793000
Reexamination Certificate
active
06718349
ABSTRACT:
FIELD OF THE INVENTION
The present invention relates to database accessing schemes and more particularly to methods for minimizing transactional incompatibilities for heavily concurrent data access among multiple users.
BACKGROUND OF THE INVENTION
In highly concurrent systems it is often desirable to cache parts of the database in a middle tier. This capability is often provided by an object/relational (O/R) engine, which as well as caching, also provides an object model on top of the relational data model. As with any caching architecture, the goal is to off-load a central resource, and provide data access in the middle tier without overly burdening the database.
Such a caching mechanism works extremely well for data which is only being read. However, for data which is being modified (and in particular for cases of heavy concurrent modification) there is a potential for conflicts. That is, if there are multiple caches containing the same database information, and there are multiple concurrent updates to those cached copies, there is the potential for one update to be incompatible with another.
There are two basic approaches to solving this problem, which are referred to as pessimistic concurrency and optimistic concurrency. In pessimistic concurrency, it is assumed that conflicts may arise, and therefore it is never possible to have more than one modifiable copy of a given piece of data. Unfortunately, this requires that data access be serialized, and therefore this solution dramatically reduces the throughput of a heavily concurrent system.
The other approach is to use optimistic concurrency, which allows multiple modifiable copies to exist, and then requires that conflicting updates be detected subsequently. There are a number of existing solutions as to how to provide optimistic concurrency, which all use a variant of a “version number.” That is, every time an update is made to the database, some kind of versioning information associated with that record is used to verify the consistency of the attempted update against the version already in the database. So, when a record is initially read from the database, the current values of the data record as well as its version number are stored. Subsequently, when it is time to update the record in the database, the update is only allowed to replace the current data in the database record if the version number has remained unchanged from when the record was initially read. Simultaneous with the database update, the version number associated with that record is also updated in the database. However, if the system detects that the version number has changed, the update is disallowed.
Reliance on version numbers, however, can result in “false” conflicts which occur because the version number is updated if any field in the record is updated, whereas it may be that only compatible subsets of fields were updated. In the case of a concurrent compatible update, there is in fact no conflict. However, a pure version number scheme will detect a conflict in this situation.
What is needed in the art is an intelligent scheme for concurrent optimistic access to a database which proactively eliminates false conflicts. The present invention satisfies this and other needs.
SUMMARY OF THE INVENTION
According to one aspect of the present, invention, a method is provided for minimizing conflicts in an optimistic concurrency database access scheme. The method includes the steps of permitting multiple users to access a data record concurrently, generating concurrent cache copies of the data record for each user who accesses the data record, each cache copy including an initial value for each of the data items which is correlated to the value in the data record, permitting each user to perform a transaction on their respective cache copies, tracking which data items were modified and whether they were read for each of the user transactions, and, for any transaction that includes modified data items, committing the transaction if no data item has been read, and committing the transaction if the data items that were read contain the same value as the initial value. In a more complex scheme, if desired, transactions can be committed only if the data items that were read satisfy the further criterion that said data records were read before any modification.
In a further aspect of the present invention, another method for minimizing conflicts in an optimistic concurrency database access scheme similarly permits multiple users to access a data record concurrently, generates concurrent cache copies of the data record for each user who accesses the data record, each cache copy including an initial value for each of the data items which is correlated to the value in the data record, and permits each user to perform a transaction on their respective cache copies. For each data item in the transaction, the method can use a first bit to track whether the data item was modified and a second bit to track the occurrence of a first prescribed operation relative to a second prescribed operation on the data item. For any transaction that includes modified data items, the transaction is committed in response to at least one predetermined criterion. The first and second prescribed operations can be, for example, a read operation and a modify operation. The prescribed criterion can be that the data items that were read contain the same value as the initial value, or that no data item has been read, or one or more other criteria, alone or in combination.
In yet a further aspect of the invention, the methodology is recited in terms of the steps that are required to perform as series of prescribed functions. That method minimizes conflicts in an optimistic concurrency database access scheme through a step for permitting multiple users to access a data record concurrently, a step for generating concurrent cache copies of the data record for each user who accesses the data record, each cache copy including an initial value for each of the data items which is correlated to the value in the data record, a step for permitting each user to perform a transaction on their respective cache copies, a step for tracking for each transaction which data items were modified and whether they were read, and, for any transaction that includes modified data items, a step for committing the transaction if no data item has been read, and a step for committing the transaction if the data items that were read contain the same value as the initial value.
These and other steps, features, aspects, and advantages of the invention will be apparent from the accompanying Drawings and Drawing Descriptions and the Detailed Description of Certain Preferred Embodiments.
REFERENCES:
patent: 5926816 (1999-07-01), Bauer et al.
patent: 6169794 (2001-01-01), Oshimi et al.
patent: 6226650 (2001-05-01), Mahajan et al.
patent: 6393419 (2002-05-01), Novak et al.
The PowerTier™ Server—A Technical Overview and Appendix A (7 pgs.).
Persistence PowerTier for C+ +—Marketing Brochure (2 pgs.).
Persistence PowerTier™ 6 for EJB (2 pgs.).
Persistence—Transactional Application-Server Technology—Unlock Your Relational Database for High-Performance, Distributed Applications (8 pgs.).
Shailesh Agarwal, Ph.D and Arthur M. Keller, Ph.D., Architecting Object Applications for High Performance with Relational Databases (14 pgs.).
Persistence Marketing Materials (5 pgs.).
Thought, Inc.—CocoBase Enterprise—What is Database Mapping? (10 pgs.).
Thought, Inc.com Web Pages (13 pgs.).
Webgain.com Web Pages (7 pgs.).
Webgain Marketing Material (2 pgs.).
eXcelon Software: Javlin Product description (6 pgs.).
Gemstone.com Marketing Materials (5 pgs.).
Amsbury Wayne
Borland Software Corporation
Darby & Darby
Nguyen Cam-Linh
LandOfFree
Intelligent, optimistic concurrency database access scheme does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Intelligent, optimistic concurrency database access scheme, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Intelligent, optimistic concurrency database access scheme will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3203603