Patent ID: 8306959

Claim:
A computer-implemented method for creating an internal representation of an immediate materialized outerjoin view, comprising: determining whether a previously defined immediate materialized view (iMV) references a base table in a relational database; in response to determining that an iMV references the base table, building a normalized join operator tree, wherein the tree is based upon a definition of the iMV; determining whether the tree satisfies predicate conditions; in response to determining that the tree satisfies the predicate conditions, performing a Preserved Side/Null Supplied Side (PSNS) annotation of the tree, to create an annotated tree; determining whether the annotated tree satisfies select list conditions of the iMV; forming an internal representation of the iMV using the annotated tree; integrating the internal representation with a query optimizer of a relational database management system (RDBMS); and in response to determining that the annotated tree satisfies the select list conditions, generating exactly one structured query language (SQL) UPDATE statement for the iMV to be used in response to detecting that the base table is updated, wherein the exactly one UPDATE statement relaxes restrictions imposed by the definition of the iMV by: not requiring intermediate temporary tables for updating not-null-supplied tuples and null-supplied tuples; and computing not-null-supplied tuples in the same time to null-supplied tuples for updating the iMV.