摘要:
A method and apparatus for validating XML documents in a streaming fashion is provided. A streaming validator validates an XML document by comparing the contents of the XML document to an XML schema. Tokens are generated for each element or attribute of the XML schema and for each element or attribute of the XML document using the same generator token function. The elements and attributes of the XML document and XML schema are compared using tokens rather than string comparisons to perform the validation more efficiently.
摘要:
A database server determines, on an element-level of granularity, what form of VARRAY storage to map collections of elements defined by a XML schema. A collection element may be mapped to an in-line VARRAY or an out-of-line VARRAY. The determination may based on a variety of factors, including the database type mapped to the collection element, database limitations that limit the form storage for certain database types, and annotations (“mapping annotations”) embedded within that XML schema that specifying a database type for database representation of a collection element or a form of VARRAY storage.
摘要:
A method and apparatus for efficiently maintaining XML index structures in a database system is provided. Instead of immediately synchronizing the XML index structures for every change submitted to the database, the changes are stored in a PENDING table. The XML index structures are periodically synchronized, based on certain criteria or at a user's discretion. Between synchronizations, the XML index structures may be in stale mode or current mode. If in stale mode, a request to access indexed information will use the XML index structures to find the desired indexed information without checking the PENDING table. If in current mode, a request to access indexed information will search the XML index structures and also check the PENDING table to determine 1) whether the indexed information has been updated or deleted, and 2) whether information relevant to the request has been inserted or updated.
摘要:
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.
摘要:
A method and system are provided for determining whether a given path is an indexed path of XML documents stored in a database management system. A finite state machine is built using the path subsetting rules specified by a user. The finite state machine is traversed using the given path. If any accepting states are reached during the traversal of the finite state machine, the given path is determined to matching the path subsetting rules.
摘要:
A method and system for evolving XML-schema-based data to conform to an evolved XML schema is disclosed. Based on an existing XML schema and an instance document that is based on the existing XML schema, an XML-schema-independent form of the instance document is generated. Based on a set of specified transformations and the XML-schema-independent form of the instance document, an evolved instance document is generated. The evolved instance document conforms to an evolved XML schema that incorporates changes to the existing XML schema. Techniques described herein are flexible enough to accommodate a wide variety of evolutions to XML schemas.
摘要:
Techniques are provided for encoding/decoding binary XML data in a client program before sending/receiving the XML to/from a database server. By encoding the binary XML at the client, the overhead of parsing the XML text is avoided by the database server, thus improving database server scalability. Also, the XML data is sent by the server to the client in the binary form, and the binary format is decoded by the client program to perform the necessary operations.
摘要:
A database server determines, on an element-level of granularity, what form of VARRAY storage to map collections of elements defined by a XML schema. A collection element may be mapped to an in-line VARRAY or an out-of-line VARRAY. The determination may based on a variety of factors, including the database type mapped to the collection element, database limitations that limit the form storage for certain database types, and annotations (“mapping annotations”) embedded within that XML schema that specifying a database type for database representation of a collection element or a form of VARRAY storage.
摘要:
A database system automatically detects a cyclic construct in a XML schema, determines a database representation for the cyclic construct, and maps the XML schema and elements involved in the cyclic construct to the database representation.
摘要:
One may increase the efficiency of an XML event-generating process by reducing the number of requests to allocate or deallocate system memory. Such reduction may occur as the result of pre-allocating a memory chunk of sufficient size to contain all of the memory buffers required by a particular event-generating process. Instead of allocating new memory chunks for new memory buffers, an application may store any required buffers within the pre-allocated memory chunk. A sufficient memory size may be estimated by performing the event-generating process on a training set of XML documents. Also, an application may re-use buffers during the process or between different iterations of the process, thus avoiding the need to deallocate and reallocate memory that is essentially being used for the same purpose.