← Back to Patent Explorer
US6134540A Expired / Lapsed US ⏱️ 0.0 years remaining

System, method, and program for applying query rewrite technology to object building

Assignee: International Business Machines Corp
•
Filing: 1997-05-09
•
Granted: 2000-10-17
•
Expires: 2017-05-09
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

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.

Inventors

  • 👤 Michael J. Carey
  • 👤 Gerald G. Kiernan

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-30 07:09
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/20; G06F16/28; G06F16/289; G06F16/24; G06F16/245; G06F16/2453; G06F16/24534; G06F16/24547; Y; Y10; Y10S; Y10S707/00; Y10S707/99931; Y10S707/99932; Y10S707/99933; Y10S707/99934

Claims Analysis

Total Claims: 39
Claim 1
Independent Claim 91 words
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.
Claim 2
Dependent Claim 91 words
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.
Claim 3
Dependent Claim 53 words
The system of claim 1 further comprising: means for building objects if the query requests a handle; and means for pushing down some of the predicates of the query to the database management system to restrict the results and thereby the number of objects that have to be built to resolve the query.
Claim 4
Dependent Claim 35 words
The system of claim 1 wherein the means for applying query rewrite optimizations further comprises: means for analyzing the query to determine if the query requests a handle on an object or references a method.
Claim 5
Dependent Claim 53 words
The system of claim 1 further comprising: means for giving all of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method.
Claim 6
Dependent Claim 47 words
The system of claim 1 wherein the means for applying query rewrite optimizations further comprises: means for analyzing the query to determine if the query requests a handle on an object, or if the query references a method, or if the query raises a collation sequence issue.
Claim 7
Dependent Claim 76 words
The system of claim 1 further comprising: means for giving part of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method; and means for resolving a remaining part of the query that raises a collation sequence issue in the memory of the query engine.
Claim 8
Dependent Claim 49 words
The system of claim 1 wherein the means for applying query rewrite optimizations further comprises: means for rewriting the query, if the query traverses a reference type attribute, into a join or outer join operation between relational tables; and means for resolving the rewritten query without performing object building.
Claim 9
Dependent Claim 41 words
The system of claim 1 wherein the means for applying query rewrite optimizations further comprises: means for submitting the rewritten query to a data source without object building if the query referencing the view type only requests values to be returned.
Claim 10
Dependent Claim 85 words
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.
Claim 11
Dependent Claim 85 words
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.
Claim 12
Dependent Claim 103 words
The query system of claim 9, wherein the means for applying query rewrite optimizations comprises: means for restricting a result set, by a database where the data resides, for predicates that can be pushed down to the database; means for building an object in memory, before applying remaining predicates, that cannot be pushed down, in object space if the remaining predicates involve a method, or if the remaining predicates involve a function that references objects as function arguments; and means for applying the remaining predicates, that define the query's results, in object space after retrieving complete sets of data referenced in the query.
Claim 13
Dependent Claim 106 words
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.
Claim 14
Dependent Claim 106 words
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.
Claim 15
Dependent Claim 101 words
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.
Claim 16
Dependent Claim 101 words
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.
Claim 17
Dependent Claim 53 words
The program of claim 12 further comprising: means for building objects if the query requests a handle; and means for pushing down some of the predicates of the query to the database management system to restrict the results and thereby the number of objects that have to be built to resolve the query.
Claim 18
Dependent Claim 35 words
The program of claim 12 wherein the means for applying query rewrite optimizations further comprises: means for analyzing the query to determine if the query requests a handle on an object or references a method.
Claim 19
Dependent Claim 53 words
The program of claim 12 further comprising: means for giving all of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method.
Claim 20
Dependent Claim 47 words
The program of claim 12 wherein the means for applying query rewrite optimizations further comprises: means for analyzing the query to determine if the query requests a handle on an object, or if the query references a method, or if the query raises a collation sequence issue.
Claim 21
Dependent Claim 76 words
The program of claim 12 further comprising: means for giving part of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method; and means for resolving a remaining part of the query that raises a collation sequence issue in the memory of the query engine.
Claim 22
Dependent Claim 49 words
The program of claim 12 wherein the means for applying query rewrite optimizations further comprises: means for rewriting the query, if the query traverses a reference type attribute, into a join or outer join operation between relational tables; and means for resolving the rewritten query without performing object building.
Claim 23
Dependent Claim 41 words
The program of claim 12 wherein the means for applying query rewrite optimizations further comprises: means for submitting the rewritten query to a data source without object building if the query referencing the view type only requests values to be returned.
Claim 24
Dependent Claim 118 words
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.
Claim 25
Dependent Claim 118 words
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.
Claim 26
Independent Claim 96 words
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.
Claim 27
Independent Claim 96 words
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.
Claim 28
Dependent Claim 49 words
The method of claim 21 further comprising: building objects if the query requests a handle; and pushing down some of the predicates of the query to the database management system to restrict the results and thereby the number of objects that have to be built to resolve the query.
Claim 29
Dependent Claim 33 words
The method of claim 21 wherein the step of applying query rewrite optimizations further comprises: analyzing the query to determine if the query requests a handle on an object or references a method.
Claim 30
Dependent Claim 51 words
The method of claim 21 further comprising: sending all of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method.
Claim 31
Dependent Claim 45 words
The method of claim 21 wherein the step of applying query rewrite optimizations further comprises: analyzing the query to determine if the query requests a handle on an object, or if the query references a method, or if the query raises a collation sequence issue.
Claim 32
Dependent Claim 72 words
The method of claim 21 further comprising: sending part of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method; and resolving a remaining part of the query that raises a collation sequence issue in the memory of the query engine.
Claim 33
Dependent Claim 45 words
The method of claim 21 wherein the step of applying query rewrite optimizations further comprises: rewriting the query, if the query traverses a reference type attribute, into a join or outer join operation between relational tables; and resolving the rewritten query without performing object building.
Claim 34
Dependent Claim 39 words
The method of claim 21 wherein the step of applying query rewrite optimizations further comprises: submitting the rewritten query to a data source without object building if the query referencing the view type only requests values to be returned.
Claim 35
Independent Claim 87 words
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.
Claim 36
Independent Claim 87 words
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.
Claim 37
Dependent Claim 97 words
The method of claim 29, wherein the step of applying query rewrite optimizations further comprises: restricting a result set, by a database where the data resides, for predicates that can be pushed down to the database; building an object in memory, before applying remaining predicates, that cannot be pushed down, in object space if the remaining predicates involve a method, or if the remaining predicates involve a function that references objects as function arguments; and applying the remaining predicates, that define the query's results, in object space after retrieving complete sets of data referenced in the query.
Claim 38
Independent Claim 106 words
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.
Claim 39
Independent Claim 106 words
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.

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2003-10-17 2004-04-17 2004-10-17 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2007-10-17 2008-04-17 2008-10-17 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2011-10-17 2012-04-17 2012-10-17 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag