System, method, and program for applying query rewrite technology to object building
First Claim
1. A query system comprising:
- a query engine having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and
means for applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types.
2 Assignments
0 Petitions
Accused Products
Abstract
The system, method, and program of this invention enables an object language application (e.g., C++, JAVA, etc.,) to issue a query over a view and to receive back, as query results, handles to application type objects which can be further manipulated by the application. A view is defined herein as a collection of a view type, and a view type is defined as a class or type. Upon receipt of the query referencing a view type, a query engine generates a query plan that builds mock (i.e., proxy) application type objects in memory based upon the view types. The application can run methods on the application type objects or point to other application type objects from the handles, to the application objects, that are returned to the application; and these manipulations will be understood by the query engine. In a preferred embodiment, query rewrite optimizations are applied to the queries over views requiring object building in order to optimize the evaluation of the query and the building of view objects as query results. For example, when a query over a view is analyzed and it is determined that the query is not requesting a handle, and is not referencing a method, but only asks for values, no objects are built. Also, if a query traverses a reference type attribute, but the query can be transformed into a join or outer join operation between relational tables, then no object building is required. In these above described situations, the rewritten query can be pushed down to the database management system of the data source for resolution. If the query does request a handle or references a method, then some object building is required. However, query rewrite techniques can still be applied so that parts of the query are pushed down to the DBMS to minimize the number of objects that are built.
143 Citations
31 Claims
-
1. A query system comprising:
-
a query engine having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and means for applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A query system comprising:
-
means for building objects in memory based upon a view type referenced in a query received from an application; and means for applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types. - View Dependent Claims (10)
-
-
11. A query system comprising:
-
means for receiving at the query system at a first tier a query that either invokes a method on a view type or requires a view type to be returned as a result; means for determining at the query system which predicates in the query are to be pushed down to a database at a second tier to be resolved; and means for applying at the query system the remaining predicates in the query in object space, which comprises determining which objects, based upon view type definitions of view types referenced by the query, are to be built by the query system.
-
-
12. A program having computer readable program code means on a computer usable medium, the program comprising:
-
means having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and means for applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. A program having computer readable program code means on a computer readable medium, the program comprising:
-
means for receiving at a query system at a first tier a query that either invokes a method on a view type or requires a view type to be returned as a result; means for determining at the query system which predicates in the query are to be pushed down to a database at a second tier to be resolved; and means for applying at the query system the remaining predicates in the query in object space, which comprises determining which objects, based upon view type definitions of view types referenced by the query, are to be built at the query system.
-
-
21. A method implemented in a query system, the method comprising:
-
providing a query engine having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28)
-
-
29. A method implemented in a query system, the method comprising:
-
building objects in memory based upon a view type referenced in a query received from an application; and applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types. - View Dependent Claims (30)
-
-
31. A method implemented in a query system, the method comprising:
-
receiving at the query system at a first tier a query that either invokes a method on a view type or requires a view type to be returned as a result; determining at the query system which predicates in the query are to be pushed down to a database at a second tier to be resolved; and applying at the query system the remaining predicates in the query in object space, which comprises determining which objects, based upon view type definitions of view types referenced by the query, are to be built at the query system.
-
Specification