Techniques for rewriting XML queries directed to relational database constructs
First Claim
1. A method for executing database commands that involve operations on extensible markup language (XML) constructs, comprising the computer-implemented steps of:
- receiving a database command that includes an XML component operation that operates on an XML construct that is based on a first set of one or more relational database constructs;
wherein the XML component operation is a function that operates on a component identified by an XPath expression;
determining whether the XML component operation can be transformed to a relational database operation on a particular set of one or more relational database constructs of the first set of one or more relational database constructs, wherein the relational database operation does not involve the XML component operation; and
if it is determined that the XML component operation can be transformed to a relational database operation that does not involve the XML component operation, then rewriting the XML operation as a particular relational database operation that does not involve the XML component operation, and evaluating the particular relational database operation on the particular set of one or more relational database constructs.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for executing database commands include receiving a database command that includes an XML component operation that operates on an XML construct that is based on a first set of one or more relational database constructs. It is determined whether the XML component operation can be transformed to a relational database operation on a particular set of one or more relational database constructs of the first set, which does not involve the XML component operation. If it is determined that the XML component operation can be transformed, then the XML component operation is rewritten as a particular relational database operation that operates on the particular set and that does not involve the XML component operation. The particular relational database operation is evaluated. In another aspect, techniques include determining a primitive set of XML generation operations and replacing non-primitive XML generation operations with one or more operations from the primitive set.
-
Citations
48 Claims
-
1. A method for executing database commands that involve operations on extensible markup language (XML) constructs, comprising the computer-implemented steps of:
-
receiving a database command that includes an XML component operation that operates on an XML construct that is based on a first set of one or more relational database constructs;
wherein the XML component operation is a function that operates on a component identified by an XPath expression;
determining whether the XML component operation can be transformed to a relational database operation on a particular set of one or more relational database constructs of the first set of one or more relational database constructs, wherein the relational database operation does not involve the XML component operation; and
if it is determined that the XML component operation can be transformed to a relational database operation that does not involve the XML component operation, then rewriting the XML operation as a particular relational database operation that does not involve the XML component operation, and evaluating the particular relational database operation on the particular set of one or more relational database constructs. - 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. A computer-implemented method for executing database commands that involve generating an extensible markup language (XML) type from relational database constructs, comprising the steps of:
-
determining a primitive set of XML generation operations for generating any XML construct from a relational database construct;
determining whether a database command involves a particular XML generation operation that is not a member of the primitive set; and
if it is determined that the database command involves the particular XML generation operation that is not a member of the primitive set, then determining a particular set of one or more XML generation operations from the primitive set that produces a same result as the particular XML generation operation, and using the particular set of one or more XML generation operations from the primitive set to evaluate the database command.
-
-
25. A computer-readable storage medium carrying one or more sequences of instructions for executing database commands that involve operations on extensible markup language (XML) constructs, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
receiving a database command that includes an XML component operation for an XML document based on one or more relational database constructs;
wherein the XML component operation is a function that operates on a component identified by an XPath expression;
determining whether the XML component operation can be transformed to a relational database operation on a particular set of one or more relational database constructs of the set of one or more relational database constructs, wherein the relational database operation does not involve the XML component operation; and
if it is determined that the XML component operation can be transformed to a relational database operation that does not involve the XML component operation, then rewriting the XML component operation to a particular relational database operation that does not involve the XML component operation, and evaluating the particular relational database operation on the particular set of one or more relational database constructs. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48)
-
-
26. A computer-readable storage medium carrying one or more sequences of instructions for executing database commands that involve generating an extensible markup language (XML) type from relational database constructs, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
determining a primitive set of XML generation operations for generating any XML construct from a relational database construct;
determining whether a database command involves a particular XML generation operation that is not a member of the primitive set; and
if it is determined that the database command involves the particular XML generation operation that is not a member of the primitive set, then determining a particular set of one or more XML generation operations from the primitive set that produces a same result as the particular XML generation operation, and using the particular set of one or more XML generation operations from the primitive set to evaluate the database command.
-
Specification