摘要:
A system and method for improving performance of join operations is disclosed. The method in one embodiment includes building a graph of vertices and edges, which represent the tables and join conditions for a particular database schema. The method then traverses the graph to find a set of candidate join operations. The method further includes selecting from the set of subset of join operations that makes the best use of a given amount of memory, which means finding a collection of denormalizations which when residing in memory provide the most benefit and the least cost for the given amount of memory. The method then deploys the denormalizations so that current queries in a query processing system can use them instead of actually performing the joins.
摘要:
The approaches described herein provide an efficient way to process certain kinds of queries that retrieve XML data stored in an object-relational database. A technique determines whether a query comprises a plurality of iteration expressions that exhibit a particular relationship to one another, and if so, re-writes the query and produces an optimized query execution plan. The query execution plan specifies an XPath-based row source with caching enabled. A very small cache structure is used, and reference locators are stored in the cache that point into binary-encoded data rather than copying XMLType data into the cache. Row data may be cached on the first use of the path-based row source and re-used in subsequent requests for rows. Once there is a subsequent request for rows from the optimized path-based row source, the cache may be reorganized to efficiently produce the rows of the row source.
摘要:
Techniques for fast and scalable generation and aggregation of XML data are described. In an example embodiment, an XML query that requests data from XML documents is received. The XML query is evaluated to determine one or more XML results. For each particular XML result, evaluating the XML query comprises: instantiating a particular data structure that represents the particular XML result, where the particular data structure is encoded in accordance with tags specified in the XML query but does not store the tags; and storing, in the particular data structure, one or more locators that respectively point to one or more fragments in the XML documents, where the particular data structure stores the one or more locators but does not store the one or more fragments. On demand, in response to a request indicating the particular XML result, a serialized representation of the particular XML result is generated based at least on the particular data structure.
摘要:
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 for incrementally maintaining an XML index built to access XML data that is encoded in binary XML form. Rather than delete and reinsert index entries of all the nodes of a modified XML document, only the index entries of the affected nodes are modified. Consequently, the order key values stored in the index may become inconsistent with the current hierarchical locations of the nodes to which the order key values correspond. Techniques are described for resolving the inconsistencies, and for addressing additional problems that result when the XML index is path-subsetted.
摘要:
A method is provided to efficiently evaluate an expression to determine the partition key for an XML document stored in a database without the entire XML document first being stored in temporary memory storage. The partition key is determined using streaming evaluation or incrementally using a DOM node tree as a portion of the document is read and stored in the buffer. The XML document is stored in the partition using the read portion of the document stored in the buffer and the remaining portion from the original source.
摘要:
A version history of each of a plurality of resources is stored in a table. The version history for each resource comprises a set of one or more values for the resource, wherein each value in the version history of a resource indicates the value that the resource had in a particular version of the resource. In response to a request to perform an operation that causes a given resource that is subject to a uniqueness constraint to have a particular value, it is determined whether the uniqueness constraint is violated based on whether any version of any resource other than the given resource has the particular value. The uniqueness constraint is determined to be violated if any version of any resource other than the given resource has the particular value. The uniqueness constraint is not violated by existence of a version of the given resource that has the particular value.
摘要:
A method and system for the in-place evolution of XML schemas is disclosed. To automatically evolve an existing XML schema, a schema evolver receives both an existing XML schema and an XML document as input. The XML document indicates changes to be made to the existing XML schema. Based on the existing XML schema and the XML document, the schema evolver evolves the existing XML schema into a new XML schema that incorporates the changes indicated in the XML document. According to one aspect, the schema evolver generates one or more SQL statements based on the new XML schema. The SQL statements, when executed by a database server, cause the database server to evolve database structures that were based on the formerly existing XML schema so that the database structures conform to the new XML schema. This is accomplished “in place,” without copying the data in the database structures.
摘要:
Techniques and systems are disclosed for directly storing semistructured data in a database. According to one aspect, a client application reads data that comprises instances of a parent type. The client application invokes routines associated with the parent type. An array is created for storing instances of the parent type. These routines invoke routines associated with a child type of the parent type. An array is created for storing instances of the child type. The arrays are populated with values specified in the data. According to one aspect, some columns of the arrays may be populated with other values to be stored in hidden columns of database tables. The client application converts the arrays into a data stream that conforms to the format of the database's data blocks. The client application then streams the data to a database server, which writes the data blocks directly into one or more data blocks in the database.
摘要:
Described is a method and system for storing data into a database, where a determination is made if schema metadata that is used to load the data into the database already exists, and where the existing schema metadata is used to load the data into the database if the schema metadata already exists. If the appropriate schema metadata does not exist, then it is generated and cached so that a later load operation for the same schema type will not need to re-generate this information. In this way, the cost to generate the schema metadata is amortized over multiple load operations to load data of the same schema type. The approach is protocol neutral so that multiple different protocol-based loads can operate with the same schema metadata information and load structures.