Claims
- 1. A method for handling structured data, the method comprising:
(a) parsing the structured data into a plurality of related nodes; (b) detecting a subtree root node in the plurality of related nodes, the subtree root node identifying a division point between an upper subtree and a lower subtree, each of the upper subtree and the lower subtree including at least one node and the lower subtree including the subtree root node; (c) identifying, in the upper subtree, a parent node of the subtree root node; and (d) creating a first link node for the upper subtree and a second link node for the lower subtree, wherein the first link node includes a reference to the lower subtree and the second link node includes a reference to the upper subtree.
- 2. The method of claim 1, further comprising:
(e) navigating from the first link node to the second link node by:
(i) using the reference of the first link node to locate the lower subtree; (ii) accessing the lower subtree; and (iii) within the lower subtree, identifying the second link node by locating a node that includes a reference to the upper subtree.
- 3. The method of claim 1, further comprising:
(f) navigating from the second link node to the first link node by:
(i) using the reference of the second link node to locate the upper subtree; (ii) accessing the upper subtree; and (iii) within the upper subtree, identifying the first link node by locating a node that includes a reference to the lower subtree.
- 4. The method of claim 1, wherein the structured data comprises an XML document.
- 5. The method of claim 1, wherein detecting a subtree root node includes detecting a node that contains an element label that matches a preselected root label.
- 6. The method of claim 1, further comprising:
(e) storing a first subtree data structure for the upper subtree, the first subtree data structure including the first link node; and (f) storing a second subtree data structure for the lower subtree, the first subtree data structure including the second link node.
- 7. The method of claim 6, further comprising:
(g) defining a stand containing a plurality of subtrees, wherein the plurality of structures includes at least one of the lower subtree and the upper subtree.
- 8. The method of claim 7, further comprising:
(h) defining a forest containing a plurality of stands.
- 9. The method of claim 1, wherein detecting a subtree root node includes determining whether a size criterion is satisfied.
- 10. A system for handling structured data, the system comprising:
a parser configured to receive the structured data and to decompose the structured data into a plurality of subtrees including at least an upper subtree and a lower subtree, wherein the upper subtree and the lower subtree are connected at a subtree root node; a builder module configured to generate a subtree data structure for each of the plurality of subtrees, including a first subtree data structure corresponding to the upper subtree and a second subtree data structure corresponding to the lower subtree; and a storage space configured to store the subtree data structures generated by the builder module, wherein the first subtree data structure includes a first link node that contains a reference to the second subtree data structure and the second subtree data structure includes a second link node that contains a reference to the first subtree data structure.
- 11. The system of claim 10, wherein the second subtree data structure further includes a node corresponding to the subtree root node.
- 12. The system of claim 10, wherein the structured data comprises an XML document.
- 13. The system of claim 10, wherein the subtree root node contains an element label that matches a preselected root label.
- 14. The system of claim 10, further comprising a stand module configured to construct at least one stand, each stand containing a plurality of subtree data structures.
- 15. The system of claim 14, further comprising a query module configured to access the at least one stand.
- 16. The system of claim 14, further comprising an update module configured to update one of the subtree data structures contained in one of the at least one stand by marking the subtree data structure in the stand as deleted and re-creating the subtree data structure with updated data as a subtree data structure in a new stand.
- 17. The system of claim 14, wherein at least two stands are constructed, the system further comprising a merge module configured to select at least two of the stands and to merge the selected stands into a new stand.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of U.S. Provisional Application No. 60/388,717, filed Jun. 13, 2002, entitled “XML-DB Subtree Storage,” which disclosure is incorporated herein by reference for all purposes. The present disclosure is related to the following commonly assigned co pending U.S. patent applications:
[0002] Ser. No. ______ (Attorney Docket No. 021512 000210US, filed on the same date as the present application, entitled “PARENT-CHILD QUERY INDEXING FOR XML DATABASES” (hereinafter “Lindblad II-A”);
[0003] Ser. No. ______ (Attorney Docket No. 021512 000310US, filed on the same date as the present application, entitled “XML DB TRANSACTIONAL UPDATE SYSTEM” (hereinafter “Lindblad III-A”); and
[0004] Ser. No. ______ (Attorney Docket No. 021512 000410US, filed on the same date as the present application, entitled “XML DATABASE MIXED STRUCTURAL-TEXTUAL CLASSIFICATION SYSTEM” (hereinafter “Lindblad IV-A”); The respective disclosures of these applications are incorporated herein by reference for all purposes.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60388717 |
Jun 2002 |
US |