Claims
- 1. A method of establishing serialization ordering among database transactions in a database system, comprising:
given a database transaction, storing a representation of an intended use of a database resource by the database transaction; asserting serialization ordering between the database transaction and other database transactions based upon a pattern of use of the database resource by the database transaction and the other database transactions.
- 2. The method of establishing serialization ordering of claim 1, wherein asserting serialization ordering further comprises dynamically asserting serialization ordering between the database transaction and other database transactions based upon intended use of the database resource.
- 3. The method of establishing serialization ordering of claim 2, wherein the intended use of the database resource includes at least one of: accessing state of the database resource and modifying the state of the database resource.
- 4. The method of establishing serialization ordering of claim 3, wherein the serialization ordering between a first transaction accessing the state of the database resource and a second transaction modifying the state of the database resource is in the first transaction preceding the second transaction.
- 5. The method of establishing serialization ordering of claim 4, wherein the serialization ordering imposed applies whether the first transaction accessed the state of the database resource temporally before or temporally after the second transaction modifies the state of the database resource.
- 6. The method of establishing serialization ordering of claim 3, wherein the serialization ordering imposed when a first database transaction accesses or modifies the database resource and a second database transaction modifies or accesses the database resource is that the second database transaction waits for the first database transaction to complete.
- 7. The method of establishing serialization ordering of claim 1, wherein storing the representation of the intended use of database resource further comprises:
creating a resource usage record; and associating the resource usage record with the database transaction.
- 8. The method of establishing serialization ordering of claim 7, wherein the resource usage record is released when the database transaction is aborted or rolled back.
- 9. The method of establishing serialization ordering of claim 7, wherein the resource usage record is maintained for a period of time after the database transaction commits, and is not released until no serialization orderings can be created that would involve the committed database transaction in a cycle of serialization orderings.
- 10. The method of establishing serialization ordering of claim 1, wherein the database resource includes at least one of the following: a record, a subset of records in a table identified by a qualifier on contents of records, and a table of records in a relational database system.
- 11. The method of establishing serialization ordering of claim 1, wherein the database system operates in conjunction with serial ordering of database transactions, such that a first database transaction having a serialization ordering before a second database transaction can access versions of the database resource that existed before any modifications made by the second database transaction.
- 12. The method of establishing serialization ordering of claim 1, wherein the use of the database resource comprises modifying the state of the database resource with a commutative operation.
- 13. The method of establishing serialization ordering of claim 12, wherein the commutative operation is at least one of: addition, subtraction, multiplication and division.
- 14. The method of establishing serialization ordering of claim 12, wherein no serialization ordering is imposed when a plurality of database transactions operate to modify the database resource using arithmetically commutative operations.
- 15. The method of establishing serialization ordering of claim 1, wherein the serialization ordering imposed when a first database transaction commits before a second database transaction starts is that the first database transaction precedes the second database transaction.
- 16. The method of establishing serialization ordering of claim 1, wherein the step of storing a representation of the use does not assert the serialization ordering when at least one of the following occurs: the database transaction guarantees that it does not intend to use any database resource in a way that would cause a modification to any database resource, the database transaction intends only to create or insert new resources, the database transaction modifying the database resource acquired the database resource in reverse mode, the use of the database resource does not require concurrency control, and the database resource can never be shared by another database transaction.
- 17. A system for establishing serialization orderings among database transactions in a database system, comprising:
at least two transactions; a representation of intended use of a database resource by the at least two transactions; and a serialization graph storing an ordering between the at least two database transactions based upon a pattern of use of the database resource by the at least two database transactions.
- 18. A system as claimed in claim 17 wherein the database system is a multi-versioning database system.
RELATED APPLICATION(S)
[0001] This application claims the benefit of U.S. Provisional Application No. 60/410,733, filed on Sep. 13, 2002. The entire teachings of the above application(s) are incorporated herein by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60410733 |
Sep 2002 |
US |