Internal parameters (parameters aging) in an abstract query
AssigneeInternational Business Machines Corporation
InventorsRichard D. Dettinger, Daniel P. Kolz, Cale T. Rath, Shannon E. Wenzel
Life of this patent
Estimating the term…
Abstract
The present invention provides for aging queries. Queries are aged by, for example, adding temporal conditions to the queries. The temporal conditions include temporal fields having a time-based association with one or more other conditions of the respective queries. In one embodiment, each temporal condition includes a temporal field and corresponding time value, where the time value is set to the time when the respective query was last run.
Claims21
A computer-implemented method for performing queries based on aging result fields by operation of one or more computer processors, the method comprising:
- executing a first query, the first query comprising:
- one or more fields for which values of a database are to be returned in a first result set upon execution of the first query;
- and
- one or more conditions each containing one or more result fields, the one or more conditions defining logic for restricting the values to be returned upon execution of the first query;
- storing a timestamp indicative of a time at which the first query is executed;
- returning the first result set for the first query;
- storing the executed first query in a storage medium;
- retrieving the stored first query from the storage medium;
- designating at least one of the result fields of the retrieved first query as an aging parameter, wherein each result field designated as an aging parameter has an associated time value field;
- and
- for each designated aging parameter, programmatically adding, by operation of a query conversion engine executing on one or more of the computer processors, a temporal condition to the retrieved first query to produce a second query;
- wherein each temporal condition comprises the respective associated time value field and a value corresponding to the timestamp, whereby results returned for the respective aging parameter are limited to those having time values more recent than the timestamp.
A computer system, comprising:
- a database stored in a computer readable storage medium;
- an aging parameter table in which each row comprises a query and a timestamp indicating the time at which the query was last executed, wherein the query has a result field capable of being temporarily restricted;
- and
- a query manager configured to:
- store the query in the aging parameter table;
- perform a query execution operation repeatedly;
- wherein the query execution operation comprises:
- retrieving stored query from the aging parameter table;
- and
- adding a temporal condition to the retrieved query to generate a modified retrieved query, the temporal condition being applied to the result field and including the timestamp for the immediately previous execution of the query, whereby results returned for the result field are limited to those having time values more recent than the timestamp;
- and
- updating the timestamp in the aging parameter table to reflect the time at which the modified retrieved query is executed.
A computer readable storage medium containing a program which when executed by a computer processor, performs an operation comprising:
- executing a first query, the first query comprising:
- one or more fields for which values of a database are to be returned in a first result set upon execution of the first query;
- and
- one or more conditions each containing one or more result fields, the one or more conditions defining logic for restricting the values to be returned upon execution of the first query;
- storing a timestamp indicative of a time at which the first query is executed;
- returning the first result set for the first query;
- storing the executed first query in a storage medium;
- retrieving the stored first query from the storage medium;
- designating at least one of the result fields of the retrieved first query as an aging parameter, wherein each result field designated as an aging parameter has an associated time value field;
- and
- for each designated aging parameter, programmatically adding, by operation of a query conversion engine executing on the computer processor, a temporal condition to the retrieved first query to produce a second query;
- wherein each temporal condition comprises the respective associated time value field and a value corresponding to the timestamp, whereby results returned for the respective aging parameter are limited to those having time values more recent than the timestamp.
Dependencies are inferred from the claim text.