Rewriting node reference-based xquery using sql/xml
AssigneeOracle International Corporation
InventorsZhen Hua Liu, Hui Joe Chang, James W. Warner
Life of this patent
Estimating the term…
Abstract
Techniques for processing reference-based SQL/XML operators are provided. Instead of extracting copies of one or more nodes from XML data, a reference-based operator returns a reference to a node. Such a reference is used to determine, for example, whether the corresponding node comes logical before, after, or is the same as another node. An SQL/XML query that includes a reference-based operator may be the original query, or may be generated (e.g., rewritten) from a non-SQL/XML query, such as an XQuery query. One or more physical rewrites may be performed on the SQL/XML query, depending on how the XML data is stored and/or whether an XML index exists for the XML data.
Claims24
A method comprising:
- receiving a first query that conforms to a first XML query language;
- determining that an operator included in the first query requires one or more node references as operands of the operator;
- and
- generating, based on the first query, a second query that conforms to a second XML query language that is different than the first XML query language, wherein the second query includes a particular operator that, when executed, causes a reference, to a node in an XML document, to be returned.
A method comprising:
- executing an SQL/XML query that includes a reference-based operator, wherein the reference-based operator includes a set of one or more operands that each refer to one or more nodes of an XML document;
- wherein executing the SQL/XML query includes:
- determining an identifier for each of the one or more nodes;
- and
- generating results of the SQL/XML query based on the identifier.
A machine-readable storage medium carrying instructions which, when executed by one or more processors, causes the one or more processors to perform the steps of:
- receiving a first query that conforms to a first XML query language;
- determining that an operator included in the first query requires one or more node references as operands of the operator;
- and
- generating, based on the first query, a second query that conforms to a second XML query language that is different than the first XML query language, wherein the second query includes a particular operator that, when executed, causes a reference, to a node in an XML document, to be returned.
A machine-readable storage medium carrying instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:
- executing an SQL/XML query that includes a reference-based operator, wherein the reference-based operator includes a set of one or more operands that each refer to one or more nodes of an XML document;
- wherein executing the SQL/XML query includes:
- determining an identifier for each of the one or more nodes;
- and
- generating results of the SQL/XML query based on the identifier.
Dependencies are inferred from the claim text.