摘要:
Techniques are provided for searching within a collection of XML documents. A relational table in an XML index stores an entry for each node of a set of nodes in the collection. Each entry of the relational table stores an order key and a path identifier along with the atomized value of the node. An index on the atomized value provides a mechanism to perform a node-aware full-text search. Instead of storing the atomized value in the table, a virtual column may be created to represent, for each node, the atomized value of the node. Alternately, each entry of the relational table stores an order key and a path identifier along with, for simple nodes, the atomized value, and for complex nodes, a null value. For a complex node with a descendant text node, a separate entry is stored for the descendant text node in the relational table.
摘要:
Techniques for determining whether an XML query may be written are provided. In one scenario, an XML query includes an expandable path, which is a path expression that includes a wildcard character (*) or a descendant axis (//). An XML schema is used to generate multiple expanded paths (each of which is a simple path expression) from the expandable path. The XML schema is used to compare each expanded path to another expanded path and to determine whether the nodes identified by the respective expanded paths are guaranteed to occur in a particular order in XML documents that conform to the XML schema. In another scenario, an XML query includes an order operator that takes two paths as input. Similarly, an XML schema is used to compare the two paths and to determine whether the nodes identified by the two paths are guaranteed to occur in a particular order in XML documents that conform to the XML schema.
摘要:
Techniques are provided for efficiently evaluating XML queries that conform to an extension of an XML language (e.g., XQuery or XPath). The extension allows XML queries to have full-text search capabilities. Such an XML query is compiled to generate a tree of nodes that correspond to one or more conditions in the full-text portion of the query. In one technique, the amount of memory for the execution state of the tree is determined at compile time and allocated only once throughout execution of the query. In another technique, to ensure at most a single scan of a document, all the words or phrases in the full-text portion of an XML query are located before any of the other conditions in the full-text portion are evaluated. In another technique, the elements of the full-text portion of an XML query are analyzed to determine, based at least in part on cost, which evaluation strategy, of a plurality of evaluation strategies, should be employed.
摘要:
A system which combines sequential and iterative source code is provided. The system decides which type of processing would be most suitable for all portions of the source code, regardless of type. The system can adjust that decision based on the specific nature of the constructs within the source code, and can also adjust that decision based on the platform upon which the resulting executable program will run.
摘要:
A method and apparatus are provided for building and using a persistent XML tree index for navigating an XML document. The XML tree index is stored separately from the XML document content, and thus is able to optimize performance through the use of fixed-sized index entries. The XML document hierarchy need not be constructed in volatile memory, so creating and using the XML tree index scales even for large documents. To evaluate a path expression including descendent or ancestral syntax, navigation links can be read from persistent storage and used directly to find the nodes specified in the path expression. The use of an abstract navigational interface allows applications to be written that are independent of the storage implementation of the index and the content. Thus, the XML tree index can index documents stored at least in a database, a persistent file system, or as a sequence of in memory.
摘要:
A method, device, and non-transitory computer-readable storage medium are provided for efficiently registering a relational schema. In co-compilation and data guide approaches, a subset of entities from schema descriptions are selected for physical registration, and other entities from the schema descriptions are not physically registered. In the co-compilation approach, a first schema description references a second schema description, and the subset includes a set of entities from the second schema description that are used by the first schema description. In the data guide approach, the subset includes entities that are used by a set of structured documents. In a pay-as-you-go approach, schema registration includes logically registering entities without creating relational database structures corresponding to the entities. A database server may execute database commands that reference the logically registered entities. A request to store data for the entities may be executed by creating relational database structures to store the data.
摘要:
A system which combines sequential and iterative source code is provided. The system decides which type of processing would be most suitable for all portions of the source code, regardless of type. The system can adjust that decision based on the specific nature of the constructs within the source code, and can also adjust that decision based on the platform upon which the resulting executable program will run.
摘要:
A method and apparatus is provided for efficiently searching and navigating XML data stored in a relational database. When storing a collection of XML documents, certain scalar elements may be shredded and stored in a relational table, whereas unstructured data may be stored as a CLOB or BLOB column. The approach includes identifying a reference address to within an XML tree index entry and storing the address in an xmltable index. The tree index entry allows for navigation in all axes. A path-based expression may be evaluated in the context of the reference address of the LOB. The result of the evaluation identifies another XML tree index entry containing a LOB locator used to retrieve the content from the document. The tree index, node index, and secondary function indexes are used together to enhance the performance of querying the XML data.
摘要:
Techniques are provided for determining whether an XML table index may be used when executing an XML query. An XML table index is defined with a row pattern expression and one or more column pattern expressions. In one technique, an index expression is generated for each row pattern expression-column pattern expression combination. An expression included in the XML query (“query expression”) is compared against one or more of the index expressions. In another technique, even if a query expression does not exactly match a row pattern expression, it is determined whether the query expression is equivalent to the row pattern expression. In another technique, even if a query expression does not exactly match and a row pattern expression, it is determined whether the query expression is “contained by” the row pattern expression.
摘要:
Techniques are provided for determining whether an XML table index may be used when executing an XML query. An XML table index is defined with a row pattern expression and one or more column pattern expressions. In one technique, an index expression is generated for each row pattern expression-column pattern expression combination. An expression included in the XML query (“query expression”) is compared against one or more of the index expressions. In another technique, even if a query expression does not exactly match a row pattern expression, it is determined whether the query expression is equivalent to the row pattern expression. In another technique, even if a query expression does not exactly match and a row pattern expression, it is determined whether the query expression is “contained by” the row pattern expression.