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.