TRANSFORMATION OF A PHYSICAL QUERY INTO AN ABSTRACT QUERY
First Claim
1. A method of generating an abstract query from a physical query, comprising:
- receiving, from a requesting entity, a physical query composed in a query language used to query a physical database;
generating, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) conditions specified by the physical query on the data queried and (iii) relationships between the data sources queried by the physical query; and
generating, from the intermediate representation, 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 data in the physical database.
0 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the invention provide methods, systems and articles of manufacture for transforming a physical query (e.g., written in SQL) into an abstract query than can be run against an abstract database described by a database abstraction model. In one embodiment, the transformation occurs as a multiple step process: first, transformation of the physical query into an intermediate representation, such as an abstract query plan, and second, transformation of the intermediate representation into an abstract query. There are thousands upon thousands of existing physical (e.g., SQL) queries. Rather than just abandon these existing queries in favor of an abstract database, embodiments of the present invention provide for reverse query processing, that is, for creating an abstract query of the abstract database from a physical query (e.g., an SQL query) of the physical database underlying the abstraction.
-
Citations
20 Claims
-
1. A method of generating an abstract query from a physical query, comprising:
-
receiving, from a requesting entity, a physical query composed in a query language used to query a physical database;
generating, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) conditions specified by the physical query on the data queried and (iii) relationships between the data sources queried by the physical query; and
generating, from the intermediate representation, 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 data in the physical database. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-readable medium containing a program which, when executed, performs operations, comprising:
-
receiving, from a requesting entity, a physical query composed in a query language used to query a physical database;
generating, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) any conditions specified by the physical query on the data queried and (iii) relationships between the data sources queried by the physical query; and
generating, from the intermediate representation, 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 data in the physical database. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A system, for processing queries, comprising:
-
a database abstraction model that provides a set of logical fields used to compose an abstract query, wherein each logical field specifies (i) an access method that maps the logical field to data in an underlying physical database;
a runtime component configured to receive a physical query, and in response to generate, from the physical query, an intermediate representation of the physical query that indicates (i) data sources within the physical database containing data queried by the physical query, (ii) conditions specified by the physical query on the data queried and (iii) the relationships between the data sources queried by the physical query; and
generating, from the intermediate representation, 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 data in the physical database. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification