Patent ID: 8176036

Claim:
A method for optimizing a query, comprising: reaching a query result from a query node by analyzing a schema graph to find a Y value for a specified X value, wherein the schema graph comprises a field X and a field Y; identifying, from the schema graph, join paths between the field X, and the field Y, and the specified X value; determining individual data paths that instantiate the identified join paths, wherein at least one of the individual data paths includes an intra-table edge having a key field; ranking the individual data paths with respect to specified integrity constraints, wherein said ranking includes assigning a weighting to the intra-table edge, and wherein the assigned weighting is indicative of an extent to which the key field in the intra-table edge deviates from an exact key; and computing scores, using the ranked data paths, with X values and derived Y values, wherein the scores are agglomerated for pairing X values to Y values.