IP Library Granted Patent US 7,366,735
Granted Patent B2
US 7,366,735 · App. 11/059,612 · Granted Apr 29, 2008

Efficient extraction of XML content stored in a LOB

Assignee: Oracle International Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,366,735
App. No.
11/059,612
Granted
Apr 29, 2008
Kind
B2
Abstract

A method and system are provided for extracting a valid, self-contained fragment for a node in a XML document stored in a database management system. An XML index is used to identify a location in which XML fragment data corresponding to the node is located. Ancestors of the node are identified and examined for any information needed for the proper interpretation of the fragment. If an ancestor node contains such needed information, this information is patched into the XML fragment to ensure that the fragment is a valid, self-contained XML fragment.

Claims (33)

1. A method for providing a self-contained XML fragment for a node in an XML document managed by a database management system, the method comprising the computer-implemented steps of:

receiving a request for an XML fragment, wherein the request includes an XML path expression;

identifying a node, in an XML document managed by the database management system, that matches the XML path expression;

extracting a first XML fragment corresponding to the identified node;

identifying ancestor nodes for the identified node;

for each identified ancestor node, determining if the ancestor node includes information needed for proper interpretation of the first XML fragment, and if the ancestor node does include needed information, inserting a second XML fragment for proper interpretation of the first XML fragment containing the needed information into the first XML fragment; and

providing the first XML fragment in response to the request.

2. The method of claim 1 wherein the database management system includes an index that indexes the XML documents stored in the database management system, and wherein the step of identifying a node in an XML document comprises using the index to identify the node.

3. The method of claim 2 wherein the index includes path, value and order indexes.

4. The method of claim 1 wherein the step of extracting a first XML fragment includes:

determining a location of stored XML data corresponding to the identified node; and

reading XML data from the determined location.

5. The method of claim 4 wherein the step of determining a location of stored XML data corresponding to the identified node includes reading location information from an index that indexes the XML documents stored in the database management system.

6. The method of claim 2 wherein the step of extracting a first XML fragment includes:

constructing an XML fragment using information in the index.

7. The method of claim 3 , wherein the step of identifying ancestor nodes includes using the order index.

8. The method of claim 1 wherein the information needed for proper interpretation of the first XML fragment is a namespace declaration.

9. The method of claim 8 wherein the step of determining if the ancestor node includes information needed for proper interpretation includes determining if the namespace declaration was declared in a previously considered ancestor node.

10. The method of claim 8 wherein the step of determining if the ancestor node includes information needed for proper interpretation includes determining if the namespace declaration was declared in first XML fragment.

11. The method of claim 1 wherein the step of determining if an ancestor node includes information needed for proper interpretation is performed for each ancestor node in order from a closest ancestor node to a root ancestor node.

12. The method of claim 11 wherein the information needed for proper interpretation of the first XML fragment is a namespace declaration, and if a namespace declaration in an ancestor node matches a namespace declaration in ancestor node already considered, it is determined that the namespace declaration is not needed for proper interpretation.

13. A machine-readable storage 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 .

14. A machine-readable storage 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 .

15. A machine-readable storage 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 3 .

16. A machine-readable storage 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 .

17. A machine-readable storage 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 .

18. A machine-readable storage 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 6 .

19. A machine-readable storage 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 .

20. A machine-readable storage 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 8 .

21. A machine-readable storage 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 9 .

22. A machine-readable storage 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 10 .

23. A machine-readable storage 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 11 .

24. A machine-readable storage 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 12 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 15, 2005
From: CHANDRASEKAR, SIVASANKARAN; THUSOO, ASHISH; MURTHY, RAVI; AGARWAL, NIPUN; SEDLAR, ERIC; MUKKAMALLA, SREEDHAR
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 016294/0881 →
Continuity (6)
Continuation In Part 1088431100 · Jul 2, 2004
Continuation In Part 1094417000 · Sep 16, 2004
Provisional Application 6058769800 · Jul 13, 2004
Provisional Application 6058044500 · Jun 16, 2004
Provisional Application 6056092700 · Apr 9, 2004
Related Publication 20050228828A1 · Oct 13, 2005