Dynamic database access via standard query language and abstraction technology
AssigneeInternational Business Machines Corporation
InventorsRichard D. Dettinger, Jeffrey W. Tenner
Life of this patent
Estimating the term…
Abstract
Methods, systems, and articles of manufacture that allow saved abstract queries to be referenced from within query statements constructed using standard query languages, such as Structured Query Language (SQL), are provided.
Claims10
A computer-implemented method of gathering data from a database, comprising:
- receiving a query statement configured to request a result set from the database, including query constructs of a first query language format and a reference to at least one previously defined abstract query containing logical fields corresponding to physical fields of the database;
- obtaining the abstract query referenced in the query statement;
- generating a query executable against the database, based on the abstract query referenced in the query statement, as modified by the query constructs of the first query language format;
- wherein generating the query executable against the database comprises generating a new abstract query based on the previously defined abstract query and the query constructs;
- and
- receiving query results corresponding to the executed query.
A computer-implemented method of gathering data from a database, comprising:
- receiving a query statement configured to request a result set from the database, including query constructs of a first query language format and a reference to at least one previously defined abstract query containing logical fields corresponding to physical fields of the database;
- obtaining the abstract query referenced in the query statement;
- generating a query executable against the database, based on the abstract query referenced in the query statement, as modified by the query constructs of the first query language format;
- wherein generating the query executable against the database comprises:
- transforming the previously saved abstract query into a first query executable against the database;
- and
- modifying the first query based on the query constructs;
- and
- receiving query results corresponding to the executed query.
A computer-implemented method of gathering data from a database, comprising:
- receiving a query statement configured to request a result set from the database, including query constructs of a first query language format and a reference to at least one previously defined abstract query containing logical fields corresponding to physical fields of the database, wherein the first query language is the Structured Query Language (SQL);
- obtaining the abstract query referenced in the query statement;
- generating a query executable against the database, based on the abstract query referenced in the query statement, as modified by the query constructs of the first query language format;
- wherein the query constructs comprise at least one UNION construct and the at least one previously saved abstract query comprises at least first and a second previously saved abstract queries;
- and
- receiving query results corresponding to the executed query.
A computer-implemented method of gathering data from a database, comprising:
- receiving a query statement configured to request a result set from the database, including query constructs of a first query language format and a reference to at least one previously defined abstract query containing logical fields corresponding to physical fields of the database;
- wherein the logical fields are defined by respective logical field definitions contained in a data abstraction model, each logical field definition being mapped to a respective physical field and containing a reference to an access method configured to retrieve the data from the respective physical field;
- obtaining the abstract query referenced in the query statement;
- generating a query executable against the database, based on the abstract query referenced in the query statement, as modified by the query constructs of the first query language format;
- and
- receiving query results corresponding to the executed query.
A computer-implemented method of gathering data from a database, comprising:
- receiving a query statement configured to request a result set from the database, including query constructs of a first query language format and a reference to at least one previously defined abstract query containing logical fields corresponding to physical fields of the database;
- obtaining the abstract query referenced in the query statement;
- generating a new abstract query based on the previously defined abstract query and the query constructs;
- generating an executable query by mapping logical fields of the new abstract query to physical fields of the database;
- executing the executable query against the database;
- and
- receiving query results corresponding to the executed executable query.
A computer readable storage medium containing a program for automatically generating physical query statements which, when executed, performs operations comprising:
- receiving a query statement configured to request a result set from a database, the query statement including data manipulation logic in a first query language format and a reference to a previously defined abstract query containing data manipulation logic related to logical fields corresponding to physical fields of the database;
- merging the data manipulation logic contained in the query statement with the data manipulation logic contained in the previously defined abstract query;
- generating a query, executable against the database, based on the merged data manipulation logic;
- and
- receiving query results corresponding to the executed executable query.
Dependencies are inferred from the claim text.