Patent ID: 7321891

Claim:
A computer-implemented method for analyzing a query, the query including one or more conditions and one or more sub-queries, the conditions including one or more connecting conditions that introduce the sub-query in the query, each of the sub-queries including zero or more conditions, the method including: determining the satisfiability of the query, including: determining the satisfiability of the connecting conditions; determining the satisfiability of the conditions in the sub-queries; and determining the satisfiability of all other conditions; where determining the satisfiability of the conditions includes: creating and populating a global conditions set; and determining the satisfiability of the global conditions set; and where the query includes a clause of the form (X CC (SELECT Y FROM T)), where CC is a connecting condition, X and Y are variables or columns, T is a set of one or more tables or views, and where populating the global conditions set includes: if CC is “IN,” adding (X=Y) to the global conditions set; if CC is “NOT IN,” adding (X< >Y) to the global conditions set; and if CC includes arithmetic comparison COMP, adding (X COMP Y) to the global conditions set.