Automatic generation of database queries
First Claim
1. A computerized method for automatically generating queries for and retrieving data from a database management system (DBMS) wherein the data held in the DBMS is organized and maintained in related data structures and wherein the relationship and organization of the data structures is specified by a schema, and wherein the DBMS receives and executes queries written in a code of a query language, the method comprising:
- a) receiving a specification of a schema of a DBMS from which data is to be retrieved;
b) receiving a specification of a structure for holding data retrieved from the DBMS;
c) receiving a specification of the data sought to be retrieved from the DBMS;
d) using the specification of the schema and the specification of data sought to be retrieved automatically generating query language code to carry out two or more queries of the DBMS which will retrieve the sought after data, a first one of the queries being a primary query for retrieving a first set of data, and a second one of the queries being a secondary query for retrieving a second set of data, the secondary query using data retrieved in the primary query to obtain the second set of data;
e) automatically sending at least the first and second queries to the DBMS at different successive times and retrieving the associated data; and
f) organizing at least some of the retrieved data into the specified structure for holding data retrieved from the DBMS.
2 Assignments
0 Petitions
Accused Products
Abstract
A computer program for automatically generating queries to a database management system (DBMS) is disclosed. The computer program receives a high level specification of the data sought to be retrieved from an application program. The high level specification includes the columns from which data is sought, and any constraints on the data to be retrieved from those columns such as filter constraints. The computer program also receives a context for the columns to be queried, so that it can be determined which tables of the DBMS the columns are associated with. The computer program further receives a specification of the schema of the DBMS, with the schema specifying the relationship between the various data storage entities of the DBMS. Using the high level specification and the schema, the computer program automatically generates queries to the DBMS seeking to reduce the complexity of the queries to speed execution, and to reduce the number of round trips between the computer program and the DBMS, also to enhance speed. For this purpose, queries may be separated into primary and secondary queries, and batched together, with secondary queries using data retrieved in a primary query in order to retrieve further data.
80 Citations
18 Claims
-
1. A computerized method for automatically generating queries for and retrieving data from a database management system (DBMS) wherein the data held in the DBMS is organized and maintained in related data structures and wherein the relationship and organization of the data structures is specified by a schema, and wherein the DBMS receives and executes queries written in a code of a query language, the method comprising:
-
a) receiving a specification of a schema of a DBMS from which data is to be retrieved; b) receiving a specification of a structure for holding data retrieved from the DBMS; c) receiving a specification of the data sought to be retrieved from the DBMS; d) using the specification of the schema and the specification of data sought to be retrieved automatically generating query language code to carry out two or more queries of the DBMS which will retrieve the sought after data, a first one of the queries being a primary query for retrieving a first set of data, and a second one of the queries being a secondary query for retrieving a second set of data, the secondary query using data retrieved in the primary query to obtain the second set of data; e) automatically sending at least the first and second queries to the DBMS at different successive times and retrieving the associated data; and f) organizing at least some of the retrieved data into the specified structure for holding data retrieved from the DBMS. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system for automatically generating queries for and retrieving data from a database, comprising:
-
a database management system (DBMS) operating on a computer wherein data held in the DBMS is organized and maintained in related data structures and wherein the relationship and organization of the data structures is specified by a schema, and wherein the DBMS receives and executes queries written in a code of a query language; an application program executing on a computer; query generating program executing on a computer to perform the tasks of; a) receiving from the application program a specification of a schema of a DBMS from which data is to be retrieved, b) receiving from the application program a specification of a structure for holding data retrieved from the DBMS, c) receiving from the application program a specification of the data sought to be retrieved from the DBMS, d) using the specification of the schema and the specification of data sought to be retrieved automatically generating query language code to carry out two or more queries of the DBMS which will retrieve the sought after data, a first one of the queries being a primary query for retrieving a first set of data, and a second one of the queries being a secondary query for retrieving a second set of data, the secondary query using data retrieved in the primary query to obtain the second set of data, e) automatically sending at least the first and second queries to the DBMS at different successive times and retrieving the associated data; f) organizing at least some of the retrieved data into the specified structure for holding data retrieved from the DBMS; and g) sending the data held in the specified structure to the application program. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. An article of manufacture comprising computer program code recorded on a computer-readable media, the computer program code executable on a computer for automatically generating queries for and retrieving data from a database management system (DBMS) wherein the data held in the DBMS is organized and maintained in related data structures and wherein the relationship and organization of the data structures is specified by a schema, and wherein the DBMS receives and executes queries written in a code of a query language, the computer program code operating a computer to:
-
g) receive a specification of a schema of a DBMS from which data is to be retrieved; h) receive a specification of a structure for holding data retrieved from the DBMS; i) receive a specification of the data sought to be retrieved from the DBMS; j) use the specification of the schema and the specification of data sought to be retrieved to automatically generate query language code to carry out two or more queries of the DBMS which will retrieve the sought after data, a first one of the queries being a primary query for retrieving a first set of data, and a second one of the queries being a secondary query for retrieving a second set of data, the secondary query using data retrieved in the primary query to obtain the second set of data; k) automatically send at least the first and second queries to the DBMS at different successive times and retrieving the associated data; and l) organize at least some of the retrieved data into the specified structure for holding data retrieved from the DBMS. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification