US 7,321,891 B1 | ||
Processing database queries | ||
Ahmad Said Ghazal, Redono Beach, Calif. (US) | ||
Assigned to NCR Corp., Dayton, Ohio (US) | ||
Filed on Feb. 19, 2004, as Appl. No. 10/782,422. | ||
This patent is subject to a terminal disclaimer. | ||
Int. Cl. G06F 17/30 (2006.01) |
U.S. Cl. 707—3 [707/2; 707/4; 707/5; 707/6; 707/9; 707/10; 707/104.1] | 39 Claims |
1. 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.
|