Efficient evaluation of queries using translation
First Claim
Patent Images
1. A method of processing a query, comprising:
- receiving the query, wherein the query specifies operations;
determining that the query comprises a Structured Query Language (SQL) portion that specifies first one or more of said operations in SQL query language and a markup language portion that specifies second one or more of said operations in a markup query language;
wherein the markup query language is one of XQuery query language and XQueryX query language;
wherein, within the query, the markup language portion is embedded into the SQL portion;
generating a first in-memory representation for the SQL portion;
generating a second in-memory representation for the markup language portion;
generating a third in-memory representation of the query based on the first in-memory representation and the second in-memory representation, wherein the third in-memory representation specifies all of said operations; and
performing said operations based on the third in-memory representation;
wherein the first in-memory representation and the third in-memory representation are formatted in a first abstract syntax and the second in-memory representation is formatted in a second abstract syntax, and wherein the step of generating the third in-memory representation comprises;
generating a fourth in-memory representation in the first abstract syntax based on the second in-memory representation; and
generating the third in-memory representation based on the first in-memory representation and the fourth in-memory representation;
wherein the first abstract syntax is an SQL-related abstract syntax and the second abstract syntax is an XQuery-related abstract syntax; and
wherein the markup language portion comprises a user-defined XQuery function in the second abstract syntax; and
wherein the step of generating the fourth in-memory representation comprises generating a user-defined PL/SQL function in the first abstract syntax based on the user-defined XQuery function in the second abstract syntax.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for processing a query including receiving the query, where the query specifies certain operations; determining that the query includes a first portion in a first query language and a second portion in a second query language; generating a first in-memory representation for the first portion; generating a second in-memory representation for the second portion; generating a third in-memory representation of the query based on the first in-memory representation and the second in-memory representation; and performing the certain operations based on the third in-memory representation.
-
Citations
64 Claims
-
1. A method of processing a query, comprising:
-
receiving the query, wherein the query specifies operations; determining that the query comprises a Structured Query Language (SQL) portion that specifies first one or more of said operations in SQL query language and a markup language portion that specifies second one or more of said operations in a markup query language; wherein the markup query language is one of XQuery query language and XQueryX query language; wherein, within the query, the markup language portion is embedded into the SQL portion; generating a first in-memory representation for the SQL portion; generating a second in-memory representation for the markup language portion; generating a third in-memory representation of the query based on the first in-memory representation and the second in-memory representation, wherein the third in-memory representation specifies all of said operations; and
performing said operations based on the third in-memory representation;wherein the first in-memory representation and the third in-memory representation are formatted in a first abstract syntax and the second in-memory representation is formatted in a second abstract syntax, and wherein the step of generating the third in-memory representation comprises; generating a fourth in-memory representation in the first abstract syntax based on the second in-memory representation; and generating the third in-memory representation based on the first in-memory representation and the fourth in-memory representation; wherein the first abstract syntax is an SQL-related abstract syntax and the second abstract syntax is an XQuery-related abstract syntax; and wherein the markup language portion comprises a user-defined XQuery function in the second abstract syntax; and
wherein the step of generating the fourth in-memory representation comprises generating a user-defined PL/SQL function in the first abstract syntax based on the user-defined XQuery function in the second abstract syntax.- View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
-
-
53. A method of processing a query, comprising:
-
receiving the query, wherein the query specifies operations; determining that the query comprises a first portion that specifies first one or more of the operations in a first query language and a second portion that specifies second one or more of the operations in a second query language; generating a first in-memory representation for the first portion; generating a second in-memory representation for the second portion, wherein the second in-memory representation represents at least one query element, supported by the second query language, that is not understood by a query processor for the first query language; prior to performing any of the operations, generating a third in-memory representation of the query based on the first in-memory representation and a fourth in-memory representation, wherein the third in-memory representation specifies all of the operations, and wherein generating the third in-memory representation comprises; generating the fourth in-memory representation based on the second in-memory representation, wherein the fourth in-memory representation represents only query elements that are supported by the first query language and understood by a query processor for the first query language; and performing the operations based on the third in-memory representation; wherein the first in-memory representation and the third in-memory representation are formatted in an Structure query language (SQL) related abstract syntax or SQL-related abstract syntax and the second in-memory representation is formatted in an XQuery-related abstract syntax, and wherein the fourth in-memory representation is formatted in the SQL-related abstract syntax; wherein the second portion comprises at least one of; an XQuery aggregation in the XQuery-related abstract syntax; a set expression in the XQuery-related abstract syntax; an XQuery FLWOR order by clause in the XQuery-related abstract syntax; an XML if-then-else expression in the XQuery-related abstract syntax;
oran XML quantified expression in the XQuery-related abstract syntax. - View Dependent Claims (54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
-
Specification