Rewriting table functions as SQL strings
First Claim
1. A relational database management system of the type wherein a table function returns a set of result rows which are represented in an SQL statement by a container for the table function, the relational database management system having the improvement comprising:
- a rewrite method associated with the table function that returns an SQL string that when executed will return an equivalent set of result rows, the relational database system executing the rewrite method prior to executing the container to obtain the SQL string and thereupon rewriting the SQL statement such that the container for the table function is replaced by the returned SQL string.
1 Assignment
0 Petitions
Accused Products
Abstract
The TABLE function mechanism available in a RDBMS is used to integrate RDF models into SQL queries. The table function invocation takes parameters including an RDF pattern, an RDF model, and an RDF rule base and returns result rows to the SQL query that contain RDF triples resulting from the application of the pattern to the triples of the model and the triples inferred by applying the rule base to the model. The RDBMS includes relational representations of the triples and the rules. Optimizations include indexes and materialized views of the representations of the triples, precomputed inferred triples, and a method associated with the TABLE function that rewrites the part of the SQL query that contains the TABLE function invocation as an equivalent SQL string. The latter technique is generally applicable to TABLE functions.
-
Citations
24 Claims
-
1. A relational database management system of the type wherein a table function returns a set of result rows which are represented in an SQL statement by a container for the table function,
the relational database management system having the improvement comprising: -
a rewrite method associated with the table function that returns an SQL string that when executed will return an equivalent set of result rows, the relational database system executing the rewrite method prior to executing the container to obtain the SQL string and thereupon rewriting the SQL statement such that the container for the table function is replaced by the returned SQL string. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A method practiced in a relational database management system of the type wherein a table function returns a set of result rows which are represented in an SQL statement by a container for the table function,
the method comprising the steps of: -
receiving the SQL statement;
making an SQL string that, when executed, will return an equivalent set of result rows; and
rewriting the SQL statement such that the container is replaced with the SQL string prior to executing the SQL statement. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification