AU2006333375B2

Method and mechanism for loading XML documents into memory

Abstract

A method and apparatus for loading an XML document into memory is provided. A client loads one or more array elements into a first partition of an array that is maintained in memory. Each array element represents an XML element of an XML document. Upon determining that an amount of data maintained in the first partition exceeds a first threshold, the client subsequently loads array elements into a new partition of the array. Upon determining that an amount of data maintained in the memory of the client exceeds a second threshold, the array elements of the least recently used partition are persistently stored in a database without persistently storing the entire XML document. When the last XML element of the XML document is loaded into a partition of the array, that partition is persistently stored in the database, thereby causing the entire XML document to be stored in the database.

AU2006333375B2, drawing sheet 1
Sheet 1 of 5

Term

0.2 yearsleft in the term

Expires 29 November 2026.

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

11 claims: 5 independent, 6 dependent

  1. 1
    The claims defining the invention are as follows:1. A method for storing a single XML document in multiple database data blocks of a database, comprising: at a client, storing data representing at least one XML element in a first partition of an array maintained in client memory of the client, said at least one XML element corresponding to only part of an XML document;wherein the array is populated by array elements of a first XML type;upon determining that a first amount of data maintained in the first partition exceeds a partition size threshold, (a) creating a new partition of the array, in the client memory, that is different and other than the first partition, and (b) subsequently loading the array elements of the first XML type into the new partition of the array;upon determining that a second amount of data maintained in the client memory of the client exceeds a client memory size threshold, transmitting a request to a database server of said database to store data in the first partition in a database data block of said database;transmitting a second request to said database server to store data in the new partition in a database data block of said database;wherein transmitting a request to a database server of said database to store data in the first partition in a database data block and transmitting a request to said database server to store data in the second partition in a database data block cause the data for the first partition and data for the new partition to be stored in separate and distinct data blocks of said database;and wherein the method is performed by one or more computing devices.
  2. 2
    The method of Claim 1, further comprising determining a size of said new -142006333375 11 May 2011 partition based on, at least in part, (a) the available memory of the client or (b) a location within the database where the array elements of said new partition are to be stored.
  3. 3
    The method of Claim 1, further comprising determining a size of said new partition based on, at least in part, a number of repeating XML elements within said XML document.
  4. 4
    The method of Claim 1, wherein said request specifies to store a data stream that conforms to a data block format of a database managed by said database server.
  5. 5
    The method of Claim 1, wherein the request to said database server to store said data in the first partition in a database is a request to persistently store second array elements of the first partition in a database using a single batch INSERT SQL operation.
  6. 6
    The method of Claim 1, further comprising determining that the first partition is a least recently partition in a set of partitions maintained in the client memory of the client.
  7. 7
    The method of Claim 1, further comprising, after storing second array elements of the first partition in said database, ceasing to maintain the first partition in the client memory of the client.
  8. 8
    A method for storing a single XML document in multiple database data blocks of a database, comprising:at a client, loading one or more first array elements into a first partition of an array maintained in client memory, wherein each array element, of the one -152006333375 11 May 2011 or more first array elements, represents an XML element of an XML document;wherein the array is populated by a plurality of array elements of a first XML type;upon determining that a first amount of data maintained in the first partition exceeds a partition size threshold, (a) creating a new partition of the array, in the client memory, that is different and other than the first partition, and (b) subsequently loading the plurality of array elements of the first XML type into the new partition of the array;upon determining that a second amount of data maintained in the client memory exceeds a client memory size threshold, persistently storing the first array elements, of the first partition, in said database without persistently storing the entire XML document;transmitting a request to a database server of said database to store data in the new partition in a database data block of said database;wherein transmitting a request to a database server to store data in the first partition in a database data block and persistently storing the first array elements, of the first partition, in said database without persistently storing the entire XML document cause the data for the first partition and data for the new partition to be stored in separate and distinct data blocks of said database;and wherein the method is performed by one or more computing devices.
  9. 9
    A computing device comprising one or more processors and a volatile or nonvolatile machine-readable medium storing instructions, wherein the instructions, when executed by the one or more processors, cause the one or more processors to perform the method of any one of Claims 1 through 8. -162006333375 11 May 2011
  10. 10
    A volatile or non-volatile machine-readable medium carrying instructions, wherein the instructions, when executed by one or more processors, cause the one or more processors to perform the steps of any one of Claims 1 through 8.
  11. 11
    A method for storing a single XML document in multiple database data blocks of a database, substantially as herein described with reference to the accompanying drawings. 'I I i:I iI ί! -17WO 2007/078479 PCT/US2006/045700 1/3