Apparatus and method for adding an associative query capability to a programming language
First Claim
1. A method enabling an integration of an object query language for an object-oriented data model with a host language, wherein queries for accessing objects are in said object query language, comprising the steps of:
- constructing a preprocessor including a grammar coupling the object query language with the host language, wherein said grammar includes query statements to use expressions of the host language in accessing the objects and wherein said query statements access both transient and persistent objects;
using said preprocessor to preprocess said query statements by parsing, optimizing and translating at least one statement in said object query language into at least one statement of the host language; and
compiling said statement of the host language into executable code.
1 Assignment
0 Petitions
Accused Products
Abstract
An object-oriented query language apparatus and method provides data abstraction, seamlessness with respect to the host programming language, set support orthogonal to persistence and strong typing. Such apparatus for processing queries includes a preprocessor to parse, optimize, and translate object query language statements into efficient host language statements, connected to a compiler that compiles such host language statements into executable code. Therefore, by inputting a program containing statements using a host language'"'"'s type system as well as employing the host language'"'"'s expressions, object composition, and inheritance in the formulation of queries, and by combining the Select-From-Where style of Standard Query Language as a basic structure for query statements with the set-valued function of the host language as targets for those queries, an associative query capability is added to a host programming language, thereby improving its versatility and functionality.
201 Citations
29 Claims
-
1. A method enabling an integration of an object query language for an object-oriented data model with a host language, wherein queries for accessing objects are in said object query language, comprising the steps of:
-
constructing a preprocessor including a grammar coupling the object query language with the host language, wherein said grammar includes query statements to use expressions of the host language in accessing the objects and wherein said query statements access both transient and persistent objects; using said preprocessor to preprocess said query statements by parsing, optimizing and translating at least one statement in said object query language into at least one statement of the host language; and compiling said statement of the host language into executable code. - View Dependent Claims (2)
-
-
3. A method for executing a query in an object query language operating in conjunction with a host language, comprising the steps of:
-
defining the object query language with set declarations; formulating query statements by combining a type system of the host language as a database model with preselected aspects of a relational query language as a basic structure for said query statements; preprocessing said query statements into host language statements, said host language statements being adapted to access transient and persistent objects; compiling said host language statements; and executing said compiled host language statements to return at least one result in response to said formulated query statement. - View Dependent Claims (4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A database system, comprising:
-
a transient object memory; a persistent object memory; a programming language processor connected to said transient object memory and said persistent object memory and accepting statements in a programming language comprising a host programming language and a query extension to said host programming language, wherein said query extension uses a type system of said host programming language as a database model; and a database processor connected to said transient object memory and to said persistent object memory, wherein query operations corresponding to said query extension of said database processor are directed by programs in said programming language, and wherein said query operations include access of objects in both said transient object memory and in said persistent object memory. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A method for operating a database management system, comprising the steps of:
-
accepting queries; parsing said queries, including the sub-steps of; validating said queries in an object query language having a grammar for combining a type system of a host language as a data model with preselected aspects of a relational query language as a basic structure for said queries, said queries accessing both persistent objects and transient objects; indicating as a syntactic fault a query not conforming to said grammar and rejecting said query; globally type checking said queries; translating said queries from said object query language into said host language; compiling said translated queries; and executing said compiled queries.
-
Specification