Patent ID: 7120645

Claim:
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.