System and method for ordering a database flush sequence at transaction commit
First Claim
Patent Images
1. A computer implemented method comprising:
- performing a plurality of data operations of a transaction in a first sequential order, the transaction yet to be flushed to a relational database, the plurality, of data operations modifying a plurality of persistent data objects within an object-oriented environment,evaluating a state property associated with the modified persistent data objects to determine to flush the transaction to the relational database;
evaluating relational dependencies between the modified persistent data objects within the object oriented programming environment prior to flushing the transaction to the relational database, the evaluating relational dependencies is based on a plurality of database integrity rules identifying conditions under which a series of operation are committed to the relational database and includesevaluating the modified persistent data objects as an oriented graph, with vertices of the oriented graph representing tile modified persistent data objects and edges representing the relationships between the modified persistent data objects, andidentifying relational dependencies between the modified persistent data objects by performing a topological sort for traversing the oriented graph and for any two persistent data objects, A and B, data object A depends on persistent data object entity B if persistent data object A has a foreign key to persistent data object B, and B is created in the transaction or if persistent data object has a foreign key to persistent data object A, and A is deleted in the transaction;
reordering the plurality of data operations of the transaction within the object-oriented programming environment after evaluating the relational dependencies between the modified persistent data objects to a second sequential order based on the relational dependencies; and
flushing the transaction to the relational database, the flushing includes committing the data operations of the transaction to the relational database in the second sequential order in accordance with the reordering.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method are described for ordering a database flush sequence prior to committing transaction changes to a database. In one embodiment, a plurality of data operations modifying persistent data objects are performed in a sequential order within an object-oriented environment. Relational dependencies between the persistent data objects are evaluated and the changes to the data objects are reordered based on the relational dependencies. Once reordered, the changes are committed to the database. In one embodiment, a depth first search algorithm is employed to determine the appropriate order to commit the data to the database.
74 Citations
18 Claims
-
1. A computer implemented method comprising:
-
performing a plurality of data operations of a transaction in a first sequential order, the transaction yet to be flushed to a relational database, the plurality, of data operations modifying a plurality of persistent data objects within an object-oriented environment, evaluating a state property associated with the modified persistent data objects to determine to flush the transaction to the relational database; evaluating relational dependencies between the modified persistent data objects within the object oriented programming environment prior to flushing the transaction to the relational database, the evaluating relational dependencies is based on a plurality of database integrity rules identifying conditions under which a series of operation are committed to the relational database and includes evaluating the modified persistent data objects as an oriented graph, with vertices of the oriented graph representing tile modified persistent data objects and edges representing the relationships between the modified persistent data objects, and identifying relational dependencies between the modified persistent data objects by performing a topological sort for traversing the oriented graph and for any two persistent data objects, A and B, data object A depends on persistent data object entity B if persistent data object A has a foreign key to persistent data object B, and B is created in the transaction or if persistent data object has a foreign key to persistent data object A, and A is deleted in the transaction; reordering the plurality of data operations of the transaction within the object-oriented programming environment after evaluating the relational dependencies between the modified persistent data objects to a second sequential order based on the relational dependencies; and flushing the transaction to the relational database, the flushing includes committing the data operations of the transaction to the relational database in the second sequential order in accordance with the reordering. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system comprising:
-
A relational database implemented in a data storage device, the relational database coupled to an object-oriented programming environment; A persistence management layer within the object-oriented programming environment to perform a plurality of data operations of a transaction in a first sequential order, the transaction yet to be flushed to a relational database, the plurality, of data operations modifying a plurality of persistent data objects, evaluate a state property associated with the modified persistent data objects to determine to flush the transaction to the relational database; evaluate relational dependencies between the modified persistent data objects within the object oriented programming environment prior to flushing the transaction to the relational database, wherein evaluating of relational dependencies is based on a plurality of database integrity rules identifying conditions under which a series of operation are committed to the relational database and includes evaluating the modified persistent data objects as an oriented graph, with vertices of the oriented graph representing tile modified persistent data objects and edges representing the relationships between the modified persistent data objects, and identifying relational dependencies between the modified persistent data objects by performing a topological sort for traversing the oriented graph and for any two persistent data objects, A and B, data object A depends on persistent data object entity B if persistent data object A has a foreign key to persistent data object B, and B is created in the transaction or if persistent data object has a foreign key to persistent data object A, and A is deleted in the transaction; reorder the plurality of data operations of the transaction within the object-oriented programming environment after evaluating the relational dependencies between the modified persistent data objects to a second sequential order based on the relational dependencies; and flush the transaction to the relational database, the flushing includes committing the data operations of the transaction to the relational database in the second sequential order in accordance with the reordering. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. An article of manufacture comprising a machine-readable storage medium, including program code which, when executed by a machine, causes the machine to perform the operations of:
-
performing a plurality of data operations of a transaction in a first sequential order, the transaction yet to be flushed to a relational database, the plurality, of data operations modifying a plurality of persistent data objects within an object-oriented environment, evaluating a state property associated with the modified persistent data objects to determine to flush the transaction to the relational database; evaluating relational dependencies between the modified persistent data objects within the object oriented programming environment prior to flushing the transaction to the relational database, the evaluating relational dependencies is based on a plurality of database integrity rules identifying conditions under which a series of operation are committed to the relational database and includes evaluating the modified persistent data objects as an oriented graph, with vertices of the oriented graph representing tile modified persistent data objects and edges representing the relationships between the modified persistent data objects, and identifying relational dependencies between the modified persistent data objects by performing a topological sort for traversing the oriented graph and for any two persistent data objects, A and B, data object A depends on persistent data object entity B if persistent data object A has a foreign key to persistent data object B, and B is created in the transaction or if persistent data object has a foreign key to persistent data object A, and A is deleted in the transaction; reordering the plurality of data operations of the transaction within the object-oriented programming environment after evaluating the relational dependencies between the modified persistent data objects to a second sequential order based on the relational dependencies; and flushing the transaction to the relational database, the flushing includes committing the data operations of the transaction to the relational database in the second sequential order in accordance with the reordering. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification