IP Library › Granted Patent US 7,386,567
Granted Patent B2
US 7,386,567 · App. 10/956,300 · Granted Jun 10, 2008

Techniques for changing XML content in a relational database

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,386,567
App. No.
10/956,300
Granted
Jun 10, 2008
Kind
B2
Abstract

Techniques are provided for changing data for an XML construct in an SQL/XML compliant database management system (DBMS). The DBMS allows instances of XML type to represent XML constructs, such as XML documents, XML elements, XML attributes, and fragments of XML documents. An SQL statement is received that includes an XML operator that operates on a particular component in an instance of XML type. During execution of the SQL statement, the XML operator is evaluated by modifying content for the component without modifying the entire instance. For example, an XML delete operator deletes the particular component from the instance. Other XML operators include an insert operator, an insert-before operator, an append-child operator, and an update operator. During execution, these operators may be rewritten to operate on existing SQL constructs, or evaluated by updating only some of the existing SQL constructs, or both.

Claims (10)

1. A method of comprising: receiving, at a database server, a request to change an XML document by performing an operation on a portion of the XML document, wherein the XML document is stored on durable storage; in response to the request, accessing the portion of the XML document through relational structures managed by the database server; creating in volatile memory an in-memory representation of the XML document; performing the change to the in-memory representation; tracking which portions of the in-memory representation are changed in response to the request; and updating the durably stored XML document based on which portions of the in-memory representations were changed without updating portions of the durably stored XML document that were not changed in the in-memory representation.

2. The method of claim 1 wherein: the in-memory representation has a structure that corresponds to the portion; the method includes setting a dirty bit associated with the structure in response to performing the change on the in-memory representation; and inspecting said dirty bit to determine which portions of the durably stored XML document to change to cause the durably stored XML document to reflect changes made to the in-memory representation.

3. A computer-readable storage medium carrying storing 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 , wherein the computer-readable storage medium is one of a volatile memory or a non-volatile memory.

4. The method of claim 1 wherein the step of tracking includes: allocating a plurality of flags, each of which corresponds to a different portion of the in- memory representation; and when a change is made to the corresponding portion of the in-memory representation, changing the corresponding flag of the plurality of flags from a first state to a second state.

5. The method of claim 4 wherein the step of making the change to the XML document on durable storage includes executing update statements based on which flags of the plurality of flags are in the second state.

6. A computer-readable storage medium carrying storing 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 , wherein the computer-readable storage medium is one of a volatile memory or a non-volatile memory.

7. A computer-readable storage medium carrying storing 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 , wherein the computer-readable storage medium is one of a volatile memory or a non-volatile memory.

8. A computer-readable storage medium carrying storing 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 , wherein the computer-readable storage medium is one of a volatile memory or a non-volatile memory.

9. A method of comprising: receiving, at a database server, a request to change an XML document by performing an operation on a portion of the XML document, wherein the XML document is stored on durable storage and the step of receiving a request includes receiving a database command; rewriting the database command to produce a revised database command; and in response to the request, accessing the portion of the XML document through relational structures managed by the database server; and making the change are the XML document on durable storage by executing the revised database command on the portion of the XML document without rewriting onto the durable storage other portions of the XML document.

10. A computer-readable storage medium carrying storing 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 , wherein the computer-readable storage medium is one of a volatile memory or a non-volatile memory.

Continuity (2)
Continuation 1042844500 · May 1, 2003
Related Publication 20050044113A1 · Feb 24, 2005