Efficient query processing of XML data using XML index
First Claim
Patent Images
1. A method for handling path-based queries, the method comprising:
- receiving a path-based query that specifies a path associated with data in an XML document;
generating, based on the path, an index-enabled query that accesses an XML index that indexes a plurality of XML documents, including said XML document; and
executing the index-enabled query to use said XML index to retrieve said data required by the path-based query;
wherein generating the index-enabled query includes;
identifying a template, of a plurality of available templates, that corresponds to a format of a portion of the path-based query without regard to names of elements in the portion of the path-based query; and
generating at least a portion of the index-enabled query based on a rule associated with the template that corresponds to the format of the portion of the path-based query;
wherein each template, within the plurality of templates, corresponds to a different format of path expression;
wherein the rule associated with each template indicates how to translate path expressions that have the format, that corresponds to said each template, to expressions to be used in the index-enabled query.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus is provided for translating queries, such as path expressions and SQL/XML constructs, into SQL statements to be executed against an XML index, which improves processor time as opposed to applying path expressions directly to the original XML documents to extract the desired information. Simple path expressions, filter expressions, descendant axes, wildcards, logical expressions, relational expressions, literals, and other path expressions are all translated into SQL for efficient querying of an XML index. Similarly, rules for translating SQL/XML constructs into SQL are provided.
-
Citations
42 Claims
-
1. A method for handling path-based queries, the method comprising:
-
receiving a path-based query that specifies a path associated with data in an XML document; generating, based on the path, an index-enabled query that accesses an XML index that indexes a plurality of XML documents, including said XML document; and executing the index-enabled query to use said XML index to retrieve said data required by the path-based query; wherein generating the index-enabled query includes; identifying a template, of a plurality of available templates, that corresponds to a format of a portion of the path-based query without regard to names of elements in the portion of the path-based query; and generating at least a portion of the index-enabled query based on a rule associated with the template that corresponds to the format of the portion of the path-based query; wherein each template, within the plurality of templates, corresponds to a different format of path expression; wherein the rule associated with each template indicates how to translate path expressions that have the format, that corresponds to said each template, to expressions to be used in the index-enabled query. - 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)
-
Specification