CA2522309C

Retaining hierarchical information in mapping between xml documents and relational data

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.

CA2522309C, drawing sheet 1
Sheet 1 of 12

Term

Term ended

Expired 31 March 2024, 2.5 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

22 claims: 13 independent, 9 dependent

  1. 1
    CA 02522309 2009-04-06 CLAIMS What is claimed is:1. A computer-implemented 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 data items to represent XML constructs, comprising the steps of: receiving a SQL statement that includes a particular operator that operates on a first data item 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 data item 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.
  2. 3
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 2.
  3. 6
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 5. CA 02522309 2009-04-06
  4. 8
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 7.
  5. 10
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one 30 or more processors to perform the method recited in claim 9. CA 02522309 2009-04-06
  6. 11
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 4.
  7. 12
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 1.
  8. 13
    A computer-implemented method for processing a Structured Query Language (SQL) statement, the method comprising:detecting that the SQL statement includes a particular operator that specifies an operation for aggregating information from one or more relational tables;and during execution of the SQL statement that includes the particular operator, reading from the one or more relational tables attribute values, and corresponding level values;and generating hierarchical extensible Markup Language (XML) information as a result of said operation;wherein, within said hierarchical XML information, each of the attribute values belongs to a hierarchical level that is based on the level value that corresponds to the attribute value.
  9. 16
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 16.
  10. 18
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 17.
  11. 20
    A computer-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 19.
  12. 21
    A computer-readable medium carrying one or more sequences of CA 02522309 2009-04-06 instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 14.
  13. 22
    A computer-readable medium carrying one or more sequences of 5 instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 13.
Independent claims13