Generating Queries Using Cardinality Constraints
First Claim
1. A method, comprising:
- choosing a first set of parameters for a query;
calculating at least one additional set of parameters based on the chosen first set of parameters;
executing the query using the calculated at least one additional set of parameters;
evaluating a cardinality value of the calculated at least one additional set of parameters; and
refining the at least one additional set of parameters when a result of the evaluating is outside a predetermined range of values.
2 Assignments
0 Petitions
Accused Products
Abstract
A query generation using cardinality constraints process including choosing a first set of parameters for a query, calculating an additional set of parameters based on the first set of parameters, executing the query using additional set of parameters, evaluating the cardinality error the additional set of parameters, and refining the additional set of parameters to meet the desired cardinality constraint. Creating a query and selecting parameters for the query to meet a desired cardinality constraint or set of cardinality constraints when the query is executed against a database may be difficult. A query generation using cardinality constraints process may create a set of parameters for a query which satisfies a desired cardinality constraint or set of cardinality constraints. An application of such a query generation using cardinality constraints process may be database component and code testing.
47 Citations
20 Claims
-
1. A method, comprising:
-
choosing a first set of parameters for a query;
calculating at least one additional set of parameters based on the chosen first set of parameters;
executing the query using the calculated at least one additional set of parameters;
evaluating a cardinality value of the calculated at least one additional set of parameters; and
refining the at least one additional set of parameters when a result of the evaluating is outside a predetermined range of values. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. At least one computer-readable medium having one or more executable instructions that, when read, cause one or more processors to:
-
(a) create a set of initial parameters based on a structure of a pattern query;
(b) derive at least one set of candidate parameters for the pattern query based on at least a step size;
(c) evaluate, against a database, the pattern query using each sub-set of candidate parameters respectively corresponding to each of the at least one set of candidate parameters;
(d) select the sub-set of candidate parameters that produce the smallest deviation from a predetermined cardinality relative to the remainder of the sub-sets of candidate parameters;
(e) divide the step size by a predetermined value; and
(f) repeat (b)-(e) a predetermined number of times for a particular refinement model. - View Dependent Claims (12, 13, 14, 15, 16)
-
-
17. A system, comprising:
-
a database to store data;
a query generator to generate at least one set of parameters for a pattern query returning a predetermined number of results from the database based on a particular refinement model; and
a query evaluation layer to perform the pattern query using the at least one set of parameters. - View Dependent Claims (18, 19, 20)
-
Specification