摘要:
A database system may perform a streaming evaluation of an XPath expression by utilizing an XPath evaluation component in tandem with an XML event-streaming component. For a more optimal filtered streaming evaluation, the XML event-streaming component may provide an interface whereby the evaluation component sends certain criteria to the event-streaming component when requesting an XML event. The criteria may be based on a next unmatched step in the XPath expression. In response to the request for an XML event, the event-streaming component may only return events that match the criteria. The evaluation component may be, for example, a compiled state machine for the XPath expression. The criteria may be pre-compiled for each possible state in the state machine. The event-streaming component may also utilize the criteria along with schema information to skip parsing of certain segments of XML data.
摘要:
Data used and generated by the process of validating XML documents is divided into two categories: compile-time static data and runtime data. Runtime data may be specific to a particular XML document and changes when validating the XML document, while compile-time data does not change in this way. For example, compile-time data may be data that defines, according to a schema, the descendant elements and ordering between them. Runtime data is information generated to track which descendants occurred in a particular XML document being validated. Compile-time static data, once generated to validate a particular XML document, is cached within a shared volatile memory. Once the compile-time data is cached, the compile-time static data may be used to validate other XML documents without the need to regenerate the compile-time static data.
摘要:
Embodiments of the present invention provide systems and techniques for creating, updating, and using an ACL (access control list). A database system may include a constraining ACL which represents a global security policy that is to be applied to all applications that interact with the database. By ensuring that all ACLs inherit from the constraining ACL, the database system can ensure that the global security policy is applied to all applications that interact with the database. During operation, the system may receive a request to create or update an ACL. Before creating or updating the ACL, the system may modify the ACL to ensure that it inherits from the constraining ACL. In an embodiment, the system grants a privilege to a user only if both the ACL and the constraining ACL grant the privilege.
摘要:
Techniques are provided to achieve performance improvements for path-based access to hierarchical data and for utilizing an extensible indexing framework. Extensible operators may be optimized by evaluating the operators using functions native to the database system instead of using functions defined through an extensible indexing mechanism. Furthermore, the database system may resolve a resource path of a query when the query is compiled, and may store the mapping of the resource path to one or more resources in a cursor for the query execution plan to avoid resolving the resource path each time the cursor is used to run the query. The cursor may be made dependent on the one or more resources to which the resource path refers at compile time. This takes advantage of the observation that the mapping of the resource path to particular resources rarely changes between evaluations of a particular query.
摘要:
The approaches described herein provide an efficient way to process certain kinds of queries that retrieve XML data stored in an object-relational database. An XML query may include a predicate condition that joins two row sources. One or both of the row sources required for predicate evaluation may be path-based; that is, consume and produce rows of XMLType data. Such a path-based row source may be modified to use the predicate condition to filter the rows it generates so that only rows satisfying the predicate condition need to be further processed. A small cache structure introduced into the path-based row source may be used to optimize the evaluation of the predicate row. Once populated with row data, the cache structure may be reorganized to optimize the performance of predicate evaluation.
摘要:
A method and apparatus are described for summarizing a document. For each node in the document that satisfies a marking criteria, a start and end mark pair is stored in a summary in document order. The start mark specifies a location in the document where the node starts, and the end mark specifies a location in the document where the node ends. When evaluating a query for a hierarchical path, the document is streamed into memory until the mark of a tag matches a start mark in the summary. If that tag does not fit within the path, then streaming of the document may resume at the end mark, thereby skipping the node during streaming evaluation. Translation information may be used to indicate a logical position relative to the marks in the summary when the document is modified.
摘要:
One embodiment of the present invention provides a system for efficiently evaluating a security policy. During operation, the system retrieves one or more roles associated with the user. Next, the system checks if a session-level cache exists for a set of Access Control Entries (ACEs) which is associated with the one or more roles. If this session-level cache exists, the system returns the set of ACEs from the session-level cache. Otherwise, the system generates the set of ACEs associated with the one or more roles from an Access Control List (ACL). During operation, the system can also update the one or more roles associated with the user and update the set of ACEs based on the updated one or more roles and the ACL. The system subsequently updates the session level cache with the updated set of ACEs and updated one or more roles.
摘要:
One embodiment of the present invention provides a system that facilitates performing a cost-based optimization of authorization checks in a database system. During operation, the system receives a query at the database system. Next, the system estimates a cost for executing the query, which involves estimating a cost for evaluating authorization checks, which involve functional evaluations of access rights for data accessed by the query. The system then rewrites the query to include evaluating authorization checks within the query. The system also estimates a cost for executing the rewritten query. Next, the system determines if executing the rewritten query has a lower cost than executing the query and performing the authorization checks. If so, the system executes the rewritten query. However, if not, the system executes the query.
摘要:
The approaches described herein provide an efficient way for a database server to process certain kinds of queries that require the evaluation of an aggregation function over XML data stored in an object-relational database. An aggregation function takes multiple inputs and generates a single output. A database server first determines whether the query qualifies for this particular kind of optimization, then creates a query execution plan that specifies the use of an enhanced path-based row source, eliminating the need for a second path-based row source for computing the aggregation function. The enhanced path-based row source specified in the query execution plan computes an aggregation function and stores the result of that function computation in a column of each row. The XPath evaluation results that are the individual inputs to the aggregation function are only stored temporarily until they are used to compute the aggregation function.
摘要:
Data used and generated by the process of validating XML documents is divided into two categories: compile-time static data and runtime data. Runtime data may be specific to a particular XML document and changes when validating the XML document, while compile-time data does not change in this way. For example, compile-time data may be data that defines, according to a schema, the descendant elements and ordering between them. Runtime data is information generated to track which descendants occurred in a particular XML document being validated. Compile-time static data, once generated to validate a particular XML document, is cached within a shared volatile memory. Once the compile-time data is cached, the compile-time static data may be used to validate other XML documents without the need to regenerate the compile-time static data.