Patent ID: 8332385

Claim:
A computer-implemented method for approximating any results returned by a query over a relational data source, the method comprising: receiving, at a computer system, a set of entity types, wherein an entity type in the set of entity types represents a superset of a set of values that is storable in that field; receiving, at the computer system, an entity type for each field in a schema, wherein the schema describes a relational data source to be searched; producing, at the computer system, at least one approximation of at least one result returned by a query, wherein the query includes calls to other query procedures, and wherein the approximation includes at least one of a set of records of entity types and a set of records of Boolean formulas over entity types, wherein each field in the result occurs as a field in a record of entity types, and each entity type assigned to a field represents a superset of the set of values that are storable in that field; and optimizing, at the computer system, by transforming the other query procedures using the approximation by eliminating query parts that return an empty set of results regardless of the contents of the relational data source in a context where the query parts are called.