摘要:
Techniques and systems are provided for efficiently managing hierarchical relational data stored in object-relational database system by extending the syntax of the database language supported by the database system (e.g. SQL) to incorporate several new “hierarchical” operators. These operators are evaluated based on the hierarchical relationship defined for hierarchical relational data. The operators maybe incorporated in SQL queries along with relational operators.
摘要:
Cost-based optimizer functionality for an XML database repository provides means for optimizing the execution of database queries that access XML resources in the database repository. Statistics about XML resources that are stored in the database repository are gathered, stored and utilized by a query optimizer to compute computational costs associated with each of multiple methods of accessing particular XML resources requested in a database query. Hence, the optimizer is able to select the most efficient query execution plan based on the costs of possible access paths. In one embodiment, specific statistics about the hierarchical structure of XML resources stored in the XML database repository are gathered, stored in a relational table in the database management system, and used to compute the selectivity of query predicates and the index cost associated with traversing one or more indexes to access requested XML resources.
摘要:
Techniques for managing hierarchical data include managing a link table in a relational database. The hierarchical data includes data about a hierarchy of nodes related by multiple links. The link table includes first information, second information and link information, for each link. First information indicates a first node in the hierarchical data. Second information indicates a second node that is associated with the first node by the link. Link information indicates values for link attributes of the link between the first node and the second node, and does not indicate a value for any attribute of the first node alone or any attribute of the second node alone. The techniques support directing a single SQL statement to a path database object, constructed based on the link table, in order to obtain paths that satisfy a search on link attributes.
摘要:
Cost-based optimizer functionality for an XML database repository provides means for optimizing the execution of database queries that access XML resources in the database repository. Statistics about XML resources that are stored in the database repository are gathered, stored and utilized by a query optimizer to compute computational costs associated with each of multiple methods of accessing particular XML resources requested in a database query. Hence, the optimizer is able to select the most efficient query execution plan based on the costs of possible access paths. In one embodiment, specific statistics about the hierarchical structure of XML resources stored in the XML database repository are gathered, stored in a relational table in the database management system, and used to compute the selectivity of query predicates and the index cost associated with traversing one or more indexes to access requested XML resources.
摘要:
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.
摘要:
An XPath expression is converted into a tree-based representation where each node represents an operation to be performed and the links between nodes in the tree represent the flow of data between operations. The conversion may involve creating a parse tree for the XPath expression, and then converting the parse tree into an operator tree. The operator tree is constructed in such a way that execution of the XPath expression begins at the leaf nodes of the operator tree, and the results are then passed up the tree. After each node is executed, the results are either (1) passed to a filter that filters the results with a predicate statement or (2) passed to another node to be operated upon. This occurs until no nodes remain to be executed.
摘要:
A method and system are provided for flexibly sectioning XML documents stored in a relational database system. The method includes obtaining a set of sectioning rules; receiving an XML document that is to be stored in the relational database system; and identifying a storage location for each node in the XML document based on the set of sectioning rules. The sectioning rules can also be used to determine which tables in the relational database should be queried when a query is received, and to determine which tables in the relational database should be updated when a command to update stored XML data is received.
摘要:
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 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.