DATABASE QUERY PROCESSING METHOD AND SYSTEM
First Claim
1. A method of interrogating a database comprising a plurality of tables, said method comprising the steps of:
- generating a database query, and a data map, said data map describing the structure of table instances associated with said database query;
submitting said database query to said database;
receiving a response from said database;
traversing said data map so as to iteratively apply a data extraction process to components of said response corresponding to each table instance associated with said database query, thereby extracting required data from said response.
2 Assignments
0 Petitions
Accused Products
Abstract
An approach to reuse of database query functions using a set of “intelligent” fetch functions, one for each object in the application, in such a way that each function is able to locate the right occurrence of the database table from which it must fetch the data, then fetching the related columns. The appropriate “fetch” function is then recursively invoked for each associated object. This way, the logic that implements fetching of data from the appropriate tables and creates the structures that result from execution of the query is not query-dependent, and can be reused for every SQL query in the application. Generic functions are instructed to locate the query-specific names used to alias database tables in specific SQL queries by defining, together with each SQL query, a “table path” for every table instance involved in the query, together with a mapping to the alias used for that instance. The alias of the right table from which a “fetch” function must fetch the data is found by executing a search over the set of “table paths”, looking for the table path corresponding to that invocation of the function. The “table path” describes a path including all the tables that are “touched” when navigating the join tree from the first table to be considered to the current one.
34 Citations
16 Claims
-
1. A method of interrogating a database comprising a plurality of tables, said method comprising the steps of:
-
generating a database query, and a data map, said data map describing the structure of table instances associated with said database query;
submitting said database query to said database;
receiving a response from said database;
traversing said data map so as to iteratively apply a data extraction process to components of said response corresponding to each table instance associated with said database query, thereby extracting required data from said response. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
- 12. A computer-implemented data structure comprising a data map stored in a computer memory describing the structure of table instances associated with a database query, wherein said data map provides a concordance between a position in the structure of said data map and an alias corresponding to each table instance implicated in said data query.
-
14. A computer program in a computer readable medium comprising instructions for carrying out the steps of the method when said computer program is executed on a computer, the method comprising the steps of:
-
generating a database query, and a data map, said data map describing the structure of table instances associated with said database query;
submitting said database query to said database;
receiving a response from said database;
traversing said data map so as to iteratively apply a data extraction process to components of said response corresponding to each table instance associated with said database query, thereby extracting required data from said response. - View Dependent Claims (15)
-
-
16. A system for interrogating a database comprising a plurality of tables, the system comprising:
-
means for generating a database query, and a data map, said data map describing the structure of table instances associated with said database query;
means for submitting said database query to said database;
means for receiving a response from said database;
means for traversing said data map so as to iteratively apply a data extraction process to components of said response corresponding to each table instance associated with said database query, thereby extracting required data from said response.
-
Specification