摘要:
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.
摘要:
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.
摘要:
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.
摘要:
A method and apparatus for optimizing XML queries over heterogeneous XML tables is provided. A query that targets a container (e.g. table or collection) that contains a plurality of XML documents is received, wherein at least two XML documents in the plurality do not conform to the same schema. Based on the received query, a plurality of execution plans is generated. Each execution plan is associated with a different XML schema. An execution plan is used to execute the query relative to those XML documents that conform to the XML schema associated with the execution plan.
摘要:
A method for optimizing functions is described. A query including an invocation of a function is received. A function declaration indicates that the function is associated with a first set of datatypes. At compile-time, static type-checking is performed on the query. During the static type-checking, a second set of datatypes is determined for the function. The second set of datatypes includes the datatype of each argument of the function that is specified in the invocation. The query is compiled, where compiling the query includes compiling the function with the second set of datatypes.
摘要:
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.
摘要:
A computer is programmed to accept queries over streams of, data structured as per a predetermined syntax (e.g. defined in XML). The computer is further programmed to execute such queries continually (or periodically) on data streams of tuples containing structured data that conform to the same predetermined syntax. In many embodiments, the computer includes an engine that exclusively processes only structured data, quickly and efficiently. The computer invokes the structured data engine in two different ways depending on the embodiment: (a) directly on encountering a structured data operator, or (b) indirectly by parsing operands within the structured data operator which contain path expressions, creating a new source to supply scalar data extracted from structured data, and generating additional trees of operators that are natively supported, followed by invoking the structured data engine only when the structured data operator in the query cannot be fully implemented by natively supported operators.
摘要:
A method for optimizing functions is described. A query including an invocation of a function is received. A function declaration indicates that the function is associated with a first set of datatypes. At compile-time, static type-checking is performed on the query. During the static type-checking, a second set of datatypes is determined for the function. The second set of datatypes includes the datatype of each argument of the function that is specified in the invocation. The query is compiled, where compiling the query includes compiling the function with the second set of datatypes.
摘要:
A method and apparatus for optimizing XML queries over heterogeneous XML tables is provided. A query that targets a container (e.g. table or collection) that contains a plurality of XML documents is received, wherein at least two XML documents in the plurality do not conform to the same schema. Based on the received query, a plurality of execution plans is generated. Each execution plan is associated with a different XML schema. An execution plan is used to execute the query relative to those XML documents that conform to the XML schema associated with the execution plan.
摘要:
A method and apparatus for optimizing XML queries over heterogeneous XML tables is provided. A query that targets a container (e.g. table or collection) that contains a plurality of XML documents is received, wherein at least two XML documents in the plurality do not conform to the same schema. Based on the received query, a plurality of execution plans is generated. Each execution plan is associated with a different XML schema. An execution plan is used to execute the query relative to those XML documents that conform to the XML schema associated with the execution plan.