Patent ID: 7103613

Claim:
A method of translating an object oriented query into a corresponding relational query, said object oriented query comprising a query against a plurality of object oriented hierarchies, said object oriented hierarchies comprising a plurality of object classes related by a root leaf inheritance relationship, at least two of the object oriented hierarchies, a source object oriented hierarchy and a target object oriented hierarchy, being related by an inter-hierarchal relationship between the two object oriented hierarchies, said inter-hierarchal relationship relating a source class of the source object oriented hierarchy and a target class of the target object oriented hierarchy, said method comprising: identifying the inter-hierarchal relationship; identifying the source object oriented hierarchy of the inter-hierarchal relationship; mapping the source object oriented hierarchy into corresponding source relational tables; building a source series of joins between the source relational tables, the source series being ordered in a top-down order from a root of the source object oriented hierarchy; identifying the target class of the inter-hierarchal relationship; mapping the target object oriented hierarchy into corresponding target relational tables; building a target series of joins between the target relational tables, the target series comprising a first target series and a second target series, the first target series corresponding to the target class, a root of the target object oriented hierarchy, and intervening nodes between the target class and the root of the target object oriented hierarchy, and the second target series corresponding to nodes in leaves of the target object oriented hierarchy located below the target class; and combining the source series of joins and the target series of joins into the corresponding relational query.