A method and apparatus for transforming queries is provided. A
select-project-join query Q that specifies an antijoin is rewritten into
another query that references the materialized view M. The common section
includes the tables being antijoined, and may be one-to-many lossless with
respect to the join with the materialized view delta.