Abstract query plan
First Claim
1. A method of processing an abstract query, comprising:
- receiving, from a requesting entity, an abstract query composed from a plurality of logical fields, wherein each logical field specifies (i) a name used to identify the logical field, (ii) an access method that maps the logical field to a data source in a database;
identifying (i) a set of data sources referenced by the plurality of logical fields in the abstract query and (ii) a set of relationships between the set of data sources;
determining an acyclic graph representation of the set of data sources;
generating an abstract query plan, wherein the abstract query plan comprises;
(a) a plurality of table instances, wherein each table instance includes;
(i) an indication of a data source associated with that table instance;
(ii) each of the logical fields included in the abstract query that depend on data present in the indicated data source; and
(iii) conditions used to limit data selected from the indicated data source; and
(b) a set of join relationships that indicates how the plurality of table instances are related to one another;
performing at least one optimization of the abstract query plan to generate an optimized abstract query plan; and
traversing the optimized abstract query plan to generate a resolved query of the set of data sources.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus, and article of manufacture are provided to process an abstract query of a database abstraction constructed over an underlying physical data storage mechanism. The database may comprise a single data source, or a federated source spanning multiple systems. Embodiments of the invention process an abstract query by generating an intermediate representation of the abstract query. In one embodiment, the intermediate representation comprises an abstract query plan. An abstract query plan includes a combination of elements from the data abstraction model and elements relating to the underlying physical data storage mechanism. Once generated, a back-end component may easily traverse the abstract query plan to generate an SQL statement (or other resolved query) corresponding to the abstract query. Further, once constructed, the abstract query plan provides a platform for many different optimizations that may be selected by a user or by the runtime component inspecting the abstract query plan prior to creating the resolved query.
-
Citations
10 Claims
-
1. A method of processing an abstract query, comprising:
-
receiving, from a requesting entity, an abstract query composed from a plurality of logical fields, wherein each logical field specifies (i) a name used to identify the logical field, (ii) an access method that maps the logical field to a data source in a database; identifying (i) a set of data sources referenced by the plurality of logical fields in the abstract query and (ii) a set of relationships between the set of data sources; determining an acyclic graph representation of the set of data sources; generating an abstract query plan, wherein the abstract query plan comprises; (a) a plurality of table instances, wherein each table instance includes; (i) an indication of a data source associated with that table instance; (ii) each of the logical fields included in the abstract query that depend on data present in the indicated data source; and (iii) conditions used to limit data selected from the indicated data source; and (b) a set of join relationships that indicates how the plurality of table instances are related to one another; performing at least one optimization of the abstract query plan to generate an optimized abstract query plan; and traversing the optimized abstract query plan to generate a resolved query of the set of data sources. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
Specification