Patent ID: 7490102

Claim:
A method in an Object-Relational interpretation layer that provides an interface between an application and a database, comprising: receiving a persistency request from the application comprising a plurality of persistent data elements to be implemented at the database via one or more database operations, the persistent data elements representing data from the application; organizing the persistent data elements into a tree structure comprising a plurality of nodes, wherein each node of the tree structure comprises one persistent data element, the plurality of nodes representing the plurality of persistent data elements; mapping each node of the tree structure to a Structured Query Language (SQL) sub-expression based on the persistent data element of each node, wherein each node having a combined condition of a WHERE clause is mapped via a combined-conditional processor of the Object-Relational interpretation layer, each node having an elementary condition of the WHERE clause is mapped via a simple-conditional processor of the Object-Relational interpretation layer, each node having a complex arithmetic expression is mapped via an arithmetic processor of the Object-Relational interpretation layer, and wherein each node having a string expression is mapped via a string processor of the Object-Relational interpretation layer; assembling the SQL sub-expressions into an SQL statement; determining whether the SQL statement is database-independent by comparing the SQL statement with a listing of standardized SQL statements known to be database-independent; and re-mapping one or more portions of the SQL statement to an alternative SQL statement having one or more sub-queries when the SQL statement is determined not to be database-independent, wherein the alternative SQL statement having the one or more sub-queries represents the plurality of persistent data elements in a database-independent SQL form.