Techniques for retaining hierarchical information in mapping between XML documents and relational data
First Claim
1. A method for converting data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent XML constructs, comprising the steps of:
- receiving a SQL statement that includes a particular operator that operates on a first instance of XML type that represents a first set of zero or more XML elements; and
during execution of the SQL statement, evaluating the particular operator by generating an ordered collection of zero or more instances of XML type, wherein each different instance of XML type in the ordered collection is based on a different XML element from the first set; and
there is an instance of XML type in the ordered collection for every XML element in the first set.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for managing XML data in an SQL compliant DBMS include receiving an SQL statement. The SQL statement includes a particular operator that operates on a first instance of XML type that represents a first set of XML elements. During execution of the SQL statement, the particular operator is evaluated by generating an ordered collection of instances of XML type. Each different instance in the ordered collection is based on a different XML element from the first set; and there is an instance in the ordered collection for every XML element from either the first set or from the first set and its descendents. When descendents are included, each entry in the ordered collection indicates a level in the XML tree. In another aspect, an aggregate operator in the SQL statement operates on a collection of instances, with associated levels, to generate a single instance of XML type.
-
Citations
15 Claims
-
1. A method for converting data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent XML constructs, comprising the steps of:
-
receiving a SQL statement that includes a particular operator that operates on a first instance of XML type that represents a first set of zero or more XML elements; and
during execution of the SQL statement, evaluating the particular operator by generating an ordered collection of zero or more instances of XML type, wherein each different instance of XML type in the ordered collection is based on a different XML element from the first set; and
there is an instance of XML type in the ordered collection for every XML element in the first set.
-
-
2. A method for converting hierarchical data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent XML constructs, comprising the steps of:
-
receiving a SQL statement that includes a particular operator that operates on a first instance of XML type that represents at least a first XML construct that includes a first set of one or more XML constructs for which the first XML construct is an ancestor node in an XML tree hierarchy; and
during execution of the SQL statement, evaluating the particular operator by generating an ordered collection of one or more entries, wherein each entry in the ordered collection includes a particular instance of XML type that represents a particular XML construct of the first set, and data that indicates a level of the particular XML construct in the XML tree hierarchy. - View Dependent Claims (3, 4, 5, 6, 7)
-
-
8. A method for converting hierarchical data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent XML constructs, comprising the steps of:
-
receiving a SQL statement that includes a particular aggregation operator that operates on a particular instance of XML type of a plurality of instances of XML type to be included in a result instance of XML type that represents an ancestor XML construct, and a particular level that indicates a level in an XML tree hierarchy for the ancestor XML construct where a particular XML construct represented by the particular instance of XML type is to be placed; and
during execution of the SQL statement, evaluating the particular aggregation operator by inserting the particular instance of XML type into the result instance of XML type at a depth indicated by the level. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer-readable medium carrying one or more sequences of instructions for converting hierarchical data between extensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent 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 SQL statement that includes a particular operator that operates on a first instance of XML type that represents a first set of zero or more XML elements; and
during execution of the SQL statement, evaluating the particular operator by generating an ordered collection of zero or more instances of XML type, wherein each different instance of XML type in the ordered collection is based on a different XML element from the first set; and
there is an instance of XML type in the ordered collection for every XML element in the first set.
-
-
14. A computer-readable medium carrying one or more sequences of instructions for converting hierarchical data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent 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 SQL statement that includes a particular operator that operates on a first instance of XML type that represents at least a first XML construct that includes a first set of one or more XML constructs for which the first XML construct is an ancestor node in an XML tree hierarchy; and
during execution of the SQL statement, evaluating the particular operator by generating an ordered collection of one or more entries, wherein each entry in the ordered collection includes a particular instance of XML type that represents a particular XML construct of the first set, and data that indicates a level of the particular XML construct in the XML tree hierarchy.
-
-
15. A computer-readable medium carrying one or more sequences of instructions for converting hierarchical data between eXtensible Markup Language (XML) constructs and Structured Query Language (SQL) constructs in an SQL compliant database management system (DBMS) that allows instances of XML type to represent 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 SQL statement that includes a particular aggregation operator that operates on a particular instance of XML type of a plurality of instances of XML type to be included in a result instance of XML type that represents an ancestor XML construct, and a particular level that indicates a level in an XML tree hierarchy for the ancestor XML construct where a particular XML construct represented by the particular instance of XML type is to be placed; and
during execution of the SQL statement, evaluating the particular aggregation operator by inserting the particular instance of XML type into the result instance of XML type at a depth indicated by the level.
-
Specification