摘要:
A technique for updating collection-valued and other complex structured columns in a nested table using a nested extension of an UPDATE statement that uses syntax and semantics to modify collection-valued columns in a way that is analogous to the syntax and semantics of the UPDATE statement that is used to modify scalar-valued columns of the table (called the outer UPDATE). Using the same syntactic and semantic constructs as the table at the outer level allows an existing implementation that processes modifications to relational tables to reuse its implementation techniques for processing outer updates to modify collection-valued columns as well. The UPDATE extensions enable the specification of updates to nested collections embedded at arbitrary levels of depth in the object model. The new syntax is embedded inside the outer UPDATE statement in a way that parallels the structure of the data itself and thus maps more directly to the user's conceptual model of the data. The method for implementing the UPDATE extensions uses a change descriptor, which is a data structure that aggregates substantially all changes, both scalar and collection-valued into a single value that can be applied to the changed collection-valued column. This technique can also be used for modifications to other kinds of complex-structured columns such as objects or xml. The change descriptor includes hierarchical information for the cell, thereby enabling efficient application of multiple updates at various granularity levels in a single operation and enabling the implementation of efficient index maintenance algorithms by updating only the indexes affected by the UPDATE operation and updating only those index rows that were affected by the UPDATE operation.
摘要:
Several embodiments of the present invention are directed to systems and methods for extending the UDT framework of an extended relational data store (ERDS) to include support for unordered collections (multisets) and ordered collection (lists). More specifically, several embodiments of the present invention use an UDT infrastructure, CLR generics, and a new UNNEST operator to create and utilize a special type abstraction for collections that is simultaneously a scalar and a relation. As a scalar, this collection type can be processed by all parts of the data store engine that understand scalars (including but not limited to the client stack) and, as a relation, this collection type is queriable like any other type of relation.
摘要:
Improved query optimizer using implied predicates. The system facilitates allowing a query optimizing component to introduce into a query, extra predicates that facilitate the following: render the same results as the original query; are used as dictated by rules passed to the optimizing component—these rules specify whether the new predicate is an equivalence (that will substitute the old predicate) or an implication (in which the old predicate is preserved); are considered as cost-based alternatives, and discarded if not useful; are tied to index utilization; and can consider both standard and multi-valued indices.
摘要:
A computerized system and method for transforming the results of a query into a hierarchical information stream, such as an eXtensible Markup Language (XML) data stream is disclosed. A database server receives a query and generates a rowset. A rowset processor, using the mode specified in the query, processes the rowset and query to generate the XML data stream. For the “auto1” mode, the rowset processor transforms a rowset into an XML data stream using primary-foreign key information specified in the query to determine nesting. For the “auto2” mode, the rowset processor transforms a rowset into an XML data stream using table ordering information included in the query to determine nesting. For the “explicit” mode, the rowset processor transforms a rowset into an XML data stream using the explicit organizational information specified in the query.
摘要:
An extensible markup language (XML) expression included in a query is parsed to yield an abstract syntax tree. The abstract syntax tree is then transformed into a unified tree including XML algebra operations. The unified tree is then converted into a relational tree including enhanced relational algebra operations. The relational tree is then forwarded to a query processor for optimization and execution of the query at the query processor.
摘要:
Storing and querying XML data in a primary table or document utilizes an index of XML data and includes creating a primary table structure, creating a primary XML index commensurate with the primary table structure, populating the primary table and the primary XML index, and running a query on the XML data in a primary table by utilizing the XML index. The XML index can be implemented as a node table. The node table may have a B+-tree structure and be populated by shredding the XML values in the primary table. The XML data may be stored as binary large objects in an XML column of the primary table. Secondary XML indexes may be created to assist in the search and retrieval of XML data stored in the primary table. Both the primary XML index and the secondary XML index tables may be created using data definition language statements.
摘要:
An improved type inference may be calculated for a path expression that may be classified into a series of input expressions followed by steps. For each such series, the inference may be calculated based on input including a type for the input expression, an axis for the step, and a node test for the step. The cardinality of the input expression type is preserved for the calculation of the step type. Also, a set of one or more matching node types may be identified within the type repository. These matching node types are node types within the axis of the step that match the node test of the step. These matching node types are identified without calculating the full content type implied by the axis. Avoiding the calculation of the full content type of the axis may reduce the processing time required to perform the inference.
摘要:
The present invention provides “XML Schema Collections” and methods and systems for using the same. XML data is typically stored as an XML instance, each of which should conform to a “schema” according to a desired goal. An XML schema provides identification and organization for the data supplied by an XML instance. XML Schema Collections are collections of one or more XML schema namespaces. An storage location designated for storage of XML data, such as an XML column in a relational database, can be “typed” with an XML Schema Collection object, allowing that storage location to store XML instances that conform to more than one XML schema. XML Schema Collections provide increased data storage versatility, and facilitation of data searches.
摘要:
A method and system for transforming a query tree that includes more than one aggregator. The method includes identifying a first aggregator in the query tree, identifying a second aggregator that is located below the first aggregator in the query tree, and merging the second aggregator with the first aggregator to form a merged aggregator.
摘要:
An extensible markup language (XML) expression included in a query is parsed to yield an abstract syntax tree. The abstract syntax tree is then transformed into a unified tree including XML algebra operations. The unified tree is then converted into a relational tree including enhanced relational algebra operations. The relational tree is then forwarded to a query processor for optimization and execution of the query at the query processor.