×

Generating queries using cardinality constraints

  • US 7,882,121 B2
  • Filed: 01/27/2006
  • Issued: 02/01/2011
  • Est. Priority Date: 01/27/2006
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for testing a component of a database application, the method comprising:

  • populating, as specified by a user, a column in a database with test data that falls within a certain range specified by the user;

    specifying, by the user, a desired cardinality constraint suitable for testing the component, the component operating on a computing device, wherein the component is a software component;

    specifying, by the user, a parametric pattern query that includes a parameter, wherein the parametric pattern query is compatible with the database, and wherein the parametric pattern query is configured to restrict cardinality when evaluated against the database;

    selecting a candidate value;

    evaluating, by the computing device via the component, the parametric pattern query against the database with the parameter set to the candidate value;

    calculating, by the computing device, a cardinality error as a difference between a returned cardinality and the desired cardinality constraint, wherein the returned cardinality results from the evaluating; and

    adjusting the candidate value based on the calculated cardinality error and then repeating the evaluating the parametric pattern query against the database with the parameter set to the adjusted candidate value and the calculating the cardinality error until the calculated cardinality error is within an allowable limit.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×