摘要:
A method and apparatus for processing queries is provided. A query is received at a mid-tier node of a multi-tier system. The mid-tier node includes a mid-tier cache that is configured to cache relational tables from one or more databases managed by a database server in a database tier of the multi-tier system. At the mid-tier node, a determination is made whether the received query includes an operator for requesting data of an XML datatype from the database server, where the XML datatype is supported as a native datatype by the database server. If a determination is made that the query includes such operator, then one or more portions of one or more relational tables are retrieved from the database server and stored in the mid-tier cache. The one or more relational tables store, in the one or more portions, index information associated with the requested data of the XML datatype. The received query is rewritten into a relational query against at least the one or more portions of the one or more relational tables that are stored in the mid-tier cache.
摘要:
Using a WSDL document to exchange an interface definition for back-end business logic includes automatically mapping various elements of the WSDL document to corresponding XQuery elements to generate an XQuery interface definition “skeleton”. From such an XQuery interface skeleton, an XQuery statement can be generated by filling in the body of the function that implements the logic. The XQuery statement serves as an interface definition for an interface to the function. Furthermore, at runtime a Web Service request that is based on the WSDL document can be translated into an XQuery call into an XQuery function that implements the logic defined in the WSDL document. From there, results are obtained from the XQuery function, translated into the appropriate return format defined in the WSDL, and returned.
摘要:
Instances of complex types are logically replicated. In general, the logical replication of complex types involves converting a complex type instance from its storage format into a logical representation written in a markup language, like XML. The logical representation is then propagated to a destination (or destinations), which converts the logical representation to a storage format used at the destination for that complex type.
摘要:
A method and apparatus for processing queries is provided. A query is received at a mid-tier node of a multi-tier system. The mid-tier node includes a mid-tier cache that is configured to cache relational tables from one or more databases managed by a database server in a database tier of the multi-tier system. At the mid-tier node, a determination is made whether the received query includes an operator for requesting data of an XML datatype from the database server, where the XML datatype is supported as a native datatype by the database server. If a determination is made that the query includes such operator, then one or more portions of one or more relational tables are retrieved from the database server and stored in the mid-tier cache. The one or more relational tables store, in the one or more portions, index information associated with the requested data of the XML datatype. The received query is rewritten into a relational query against at least the one or more portions of the one or more relational tables that are stored in the mid-tier cache.
摘要:
Transformation of a set of XML documents via an XSLT stylesheet is made more efficient by rewriting the stylesheet at compile-time, based on the structural description of the set of XML documents, into an optimized stylesheet containing fewer dynamic template-matching calls than the original stylesheet. This rewritten stylesheet can be further rewritten into a set of XQuery expressions. At compile-time, the particular transformation templates that are appropriate for transforming the particular nodes contained in the set of XML documents are determined, and XSLT calls to the templates are converted to calls to corresponding XQuery user-defined functions. Determination of the appropriate transformation templates may be based on the structural description of the input set of XML documents, such as an XML Schema or Document Type Definition. The data from each template is translated into corresponding XQuery constructors, instructions from the template are translated into XQuery expressions, and the XQuery functions are inlined if possible.
摘要:
To associate XML data objects (“child objects”), stored in rows of relational or object-relational tables, with the appropriate XML data objects (“parent objects”) from which the child objects descend, tables that contain child objects (“out-of-line” tables) are constructed with an additional column. In one embodiment, this column stores values that identify the root objects, in the appropriate table, from which the respective child objects descend. Hence, the root object from which any given object descends is traceable by following the respective value back to the corresponding root object. In one embodiment, this column stores values that identify the complete XML hierarchical path, through multiple tables, back to the root object from which the respective child objects descend. Consequently, XML query language queries against XML documents stored in such tables can be rewritten as SQL queries against the data in the tables, even in the presence of cyclic constructs.
摘要:
A method for representing XML information is provided. A serialized image of XML information is generated. The serialized image comprises a collection of one or more serialized data values, where each particular serialized data value in the collection includes data associated with a particular serialized data value type of a plurality of serialized data value types. The serialized image may also comprise a first field that includes a first value, which indicates that the serialized image includes the collection of one or more serialized data values. In some embodiments, the method is performed at a database system that supports a native XML data type, wherein the XML information is one or more instances of the native XML data type.
摘要:
Techniques are described for executing queries that have XPath sections that specify unmappable paths. The techniques involve splitting the unmappable paths into (1) a mappable path fragment, and (2) an unmappable path fragment. After an unmappable path has been split into a mappable path fragment and an unmappable path fragment, the XPath section is replaced with a replacement XPath section. The replacement XPath section specifies two operations: a “mappable operation” that is based on the mappable path fragment, and an “unmappable operation” that is based on the unmappable path fragment. The portion of the replacement XPath section that specifies the mappable operation is rewritten to access underlying relational structures. Consequently, when the rewritten query is executed, a smaller amount of XML data needs to be materialized to evaluate the unmappable path fragment than would otherwise have been required to evaluate the original unmappable path.
摘要:
Techniques are provided for updating data that logically resides in one or more nested collections in a nested collection column of a view. According to one technique, a Data Manipulation Language (DML) statement that operates on individual elements within the one or more nested collections is detected. Instead of executing the DML statement, trigger code is executed once for each individual element, within the one or more nested collections, that is targeted by the DML statement. In addition, the trigger code may include one or more references to parent values. For each nested collection selected by the DML statement, the following steps are performed when the trigger code includes references to parent values: determining the row, within the view, in which the nested collection resides and, prior to executing the trigger code for the nested collection, binding the one or more references to one or more corresponding values that logically reside in the row.
摘要:
Network and storage calls are reduced by batching messages. Messages are collected from a client and sent to the gateway or backend application in one round trip. Alternatively, the messages are collected for different entities, and the batched messages are durably stored. Related messages, which may have the same sessionID, are grouped into a logical unit or session. This session may be locked to a single message consumer. A session may be associated with an application processing state as an atomic unit of work while other operations are performed on the messages in the session. Acknowledgements are accumulated by a broker on a message server, but the messages are not immediately deleted. Instead, multiple messages in a selected range are periodically truncated from a message store in a single operation. Expired messages for active sessions are proactive cleaned up to prevent sessions from reaching a quota or limit.