Abstract query plan
First Claim
1. A method of accessing data in a database, 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, and (ii) an access method that maps the logical field to a data source in the database;
generating, from the abstract query, an intermediate representation of the abstract query that indicates (i) which logical fields and access methods are included in the abstract query, (ii) the data sources within the database containing the data, and (iii) the relationships between the data sources in the database; and
generating, from the intermediate representation, a resolved query of the database.
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
41 Claims
-
1. A method of accessing data in a database, 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, and (ii) an access method that maps the logical field to a data source in the database;
generating, from the abstract query, an intermediate representation of the abstract query that indicates (i) which logical fields and access methods are included in the abstract query, (ii) the data sources within the database containing the data, and (iii) the relationships between the data sources in the database; and
generating, from the intermediate representation, a resolved query of the database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method of providing an abstraction of a relational database, comprising:
-
defining a data abstraction model, wherein the data abstraction model comprises;
(i) a plurality of logical fields, wherein each logical field identifies a name for the logical field and an access method that maps the logical field to a column of a table in the relational database, (ii) an indication of the relationships between logical fields, and a (iii) a representation of the relational database that identifies the relationships between data sources in the relational database;
providing a query building interface configured to allow a user to compose an abstract query from the plurality of logical fields; and
providing a runtime component configured to process an abstract query to generate an intermediate representation of the abstract query. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. 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;
(ii) each of the logical fields included in the abstract query that depend on data present on the indicated data source; and
(iii) conditions used to limit the data selected from the indicated data source; and
(b) a set of join relationships that indicate 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 data sources. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A computer-readable medium containing a plurality of instructions which, when executed on a computer system is configured to perform operations comprising:
-
receiving, from a requesting entity, an abstract query composed from a plurality of logical fields, wherein each logical field provides (i) a name used to identify the logical field, and (ii) an access method that maps the logical field to data in a database;
generating, from the abstract query, an intermediate representation of the abstract query that identifies both data from the abstract query, a corresponding data source within the database containing the data, and the relationships between different data sources in the database; and
generating, from the intermediate representation, a resolved query of the database. - View Dependent Claims (32, 33, 34)
-
-
35. A computer-readable medium containing a plurality of instructions which, when executed on a computer system is configured to perform operations comprising:
-
defining a data abstraction model, wherein the data abstraction model comprises;
a plurality of logical fields, wherein each logical field identifies a name for the logical field and an access method that maps the logical field to a data source in a relational database, an indication of the relationships between logical fields, and a graph representation of the relational database that identifies the relationships between data sources in the relational database; and
providing a query building interface configured to allow the composition of an abstract query from the plurality of logical fields;
providing a runtime component configured to process an abstract query to generate a resolved query of the relational database from the abstract query.
-
-
36. A system for processing an abstract query, comprising:
-
a data abstraction model, wherein the data abstraction model includes (i) a plurality of logical fields, wherein each logical field specifies (a) a name used to identify the logical field, and (b) an access method that maps the logical field to data in the database, (ii) a graph representation of an underlying physical data storage mechanism being abstracted by the data abstraction model;
a user interface configured to allow a user to compose an abstract query from the plurality of logical fields;
a runtime component configured to receive and abstract query, and in response, to generate an abstract query plan, wherein the abstract query plan comprises (i) a plurality of table instances, wherein the each table instance includes an indication of a data source, each of the logical fields included in the abstract query that depend on data present on the indicated data source, and conditions used to limit the data selected from the indicated data source; and
(ii) a set of join relationships that indicate how the plurality of table instances are related to one another relative to the abstract query; and
traversing the abstract query plan to generate a resolved query of the set of data based on each table instance and the join relationships indicated between table instances. - View Dependent Claims (37, 38, 39, 40, 41)
-
Specification