Patent ID: 7933913

Claim:
A storage medium having stored thereon a data structure, comprising: a first data field containing a first tree representation of a data modification statement to modify data within the data structure, wherein the data modification statement comprises an update command; a second data field containing a second tree representation of data subfields, wherein the data subfields are subfields of an indexed view, wherein the indexed view expresses a result of a predefined query applied to the database, wherein the indexed view is configured to be employed when a query similar to the predefined query is applied to the database, wherein the second tree representation comprises a relational tree that defines the indexed view and the second tree representation includes a plurality of relational operators, wherein each relational operator has child scalar expressions, wherein the second data field comprises a user-defined type (UDT) derived by way of inheritance from another UDT, the derived UDT includes each field of the another UDT and at least one additional field, the second tree representation references the another UDT and includes an operator directing that the another UDT be treated as the derived UDT so as to access the at least one additional field; a third data field identifying the fields of the a data structure that are affected by the data modification statement, wherein the third data field contains the results of a comparison between the child scalar expressions of the second data field and the first tree representation of the first data field to determine that a corresponding field of the indexed view of the second data field is affected by the data modification statement, wherein the comparison between the child scalar expressions of the second data field and the first tree representation of the first data field comprises walking the first tree representation, matching the subfields used in the child scalar expressions with subfields updated in the first tree representation, and generating for each match a query execution plan to propagate the corresponding updated subfield to the index; and a fourth data field containing a query plan modified in response to the third data field, wherein the query plan corresponds to the data modification statement so as to update the indexed view of the second data field to be consistent with the modified data within the data structure.