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.