摘要:
XQuery queries that include functions that operate on dynamically typed XML data are rewritten into compilable SQL constructs. XML data that is dynamically typed is XML data for which a specific XML data type cannot be determined at compile time and in fact may vary. In general, XQuery queries are rewritten into SQL queries that use SQL constructs in lieu of XQuery constructs. The SQL constructs include an “SQL polymorphic function” that is defined or recognized by a database system as valid syntax for an SQL query. The rewritten query applies the XML data to the SQL polymorphic function, but the XML data has been typed as XMLType, a data type recognized by SQL standards.
摘要:
Techniques and approaches are provided for creating indexes and column constraints on structured XML data that is stored in a relational database. Data Definition Language (DDL) Create Index and Create Constraint commands have extended syntax that allows the specification of a path-based expression instead of requiring a column and table name. A mapping created by the system when an XML Schema is registered stores the correspondence of XML data elements to automatically-created database tables and columns that are given names only useful for the internal system. When a user provides a path-based expression in a DDL when creating an index or constraint, the path-based expression is translated to the underlying database constructs using the mapping. Issues are addressed for handling path-based expressions that evaluate to more than one element. Additional index optimization is described using data type information available in the XML schema to select the optimal index type.
摘要:
Disclosed is a method, system, and program product for providing an efficient mechanism to provide updateable relational views over XML. This will allow application developers to write both queries and updates using a relational (SQL) syntax, even though the underlying data is stored as XML. According to some approaches, this is accomplished by implementing a reverse mapping from the data within the views to the node addresses of the corresponding data in the underlying XML document.
摘要:
A query may be rewritten to leverage information stored in a structured XML index. An operator in the query may be analyzed to determine an input source database object for the operator by traversing an operator tree rooted at the operator. The path expressions associated with the operator tree may be fused together to form an effective path expression for the operator. If the effective path expression directly matches a path expression derived from the index, the query may be rewritten using references to the index. Operators in a query that have effective paths that refer to data in the same index table may be grouped together. A single subquery may be written for a group of operators. Also, a structured XML index may be used as an implied schema for indexed XML data. This implied schema may be used to optimize queries that refer to the indexed XML data.
摘要:
A method, computing device, and a non-transitory computer-readable medium is provided for facilitating a context-aware search on documents stored in an unstructured database column. The database server determines whether a document stored in an unstructured database object is marked up according to a recognized markup language. Documents that conform to the markup language are indexed with value-to-node mappings and node-to-physical-location mappings to provide a context-aware search of marked up nodes within the documents. Documents that do not conform to the markup language are indexed with value-to-document mappings to provide a full-text search of the documents. The database server evaluates a context-aware search against documents that conform to the markup language within the unstructured column without requiring the user identify the documents as XML documents and store the documents in an XMLType structured column.
摘要:
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.
摘要:
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, computing device, and a non-transitory computer-readable medium are provided for performing a context-aware search by finding a set of nodes that are mapped to a given text or other value and, for each node in the set of nodes, performing a reverse path lookup to determine whether the node satisfies a given context. The query processor performs the reverse path lookup for a node by traversing up a node tree away from the node, using a stored mapping from the node to a parent of the node. Using mappings from nodes to parent nodes, the node tree is traversed backwards from the node up to distant ancestor nodes through parent nodes. An optimizer instructs the query processor to perform a value-based portion of the search before a path-based portion of the search based on value distribution statistics and path distribution statistics.
摘要:
A method, computing device, and a non-transitory computer-readable medium is provided for facilitating a context-aware search on documents stored in an unstructured database column. The database server determines whether a document stored in an unstructured database object is marked up according to a recognized markup language. Documents that conform to the markup language are indexed with value-to-node mappings and node-to-physical-location mappings to provide a context-aware search of marked up nodes within the documents. Documents that do not conform to the markup language are indexed with value-to-document mappings to provide a full-text search of the documents. The database server evaluates a context-aware search against documents that conform to the markup language within the unstructured column without requiring the user identify the documents as XML documents and store the documents in an XMLType structured column.
摘要:
Techniques and approaches are provided for creating indexes and column constraints on structured XML data that is stored in a relational database. Data Definition Language (DDL) Create Index and Create Constraint commands have extended syntax that allows the specification of a path-based expression instead of requiring a column and table name. A mapping created by the system when an XML Schema is registered stores the correspondence of XML data elements to automatically-created database tables and columns that are given names only useful for the internal system. When a user provides a path-based expression in a DDL when creating an index or constraint, the path-based expression is translated to the underlying database constructs using the mapping. Issues are addressed for handling path-based expressions that evaluate to more than one element. Additional index optimization is described using data type information available in the XML schema to select the optimal index type.