Patent ID: 7406468

Claim:
A computer implemented system comprising a processor that facilitates view matching for outer join views, comprising: an interface component that receives at least one query expression that includes one or more outer join operators; one or more materialized views defined by expressions composed of at least one or more of project (π), select (σ), inner join and outer join operators; and a view-matching component that converts the at least one query expression and outputs a substitute query expression, comprising; a normalization component that converts the at least one query expression and at least one materialized view expression into a normalized query expression and a normalized view expression; an analysis component that receives the normalized query expression and the normalized view expression, the analysis component effectuates duplicate elimination where a unique key is available by verifying that each view term σ P (R) required by a term in the normalized query expression can be recovered from the normalized view through utilization of expressions of the form σ P (R)=δ(π R1. * ,R2. * , . . . ,Rn. *σ □null(R1)^ . . . ^□null(Rn) V), wherein R={R 1 , R 2 , . . . , R n } is a set of source tables of a term in the normalized view V, P represents a predicate, δ denotes an operator that removes duplicates, R 1 .*, R 2 .*, . . . , Rn.* connote all columns in tables R 1 , R 2 , . . . , Rn of the normalized view, ^ represents an AND operator, and ˜null(R 1 ) . . . ˜null(Rn) are predicates testing that the columns of R 1 , . . . , Rn are not null; and a construction component that constructs the substitute query expression by recovering a source term of the normalized query expression using the selection operator with an appropriate null and not null predicate and where necessary applying duplicate elimination, where necessary utilizing the selection operator with appropriate residual predicates to restrict a result, applying the projection operator without duplicate elimination to reduce the result to one or more required output columns, exploiting one or more equivalence classes, and returning null for the one or more required output columns that originate from a table not contained in a base of the term.