Previous Topic: Materialized Query TablesNext Topic: The Materialized Query Table Editor


Add a Materialized Query Table

You use the Materialized Query Tables editor to add a materialized query table.

To add a materialized query table

  1. In a DB2 physical model, click the Materialized Query Table icon on the erwin Toolbox, click in the diagram window where you want to place the table, and enter a name for the materialized query table.

    The materialized query table is added to the diagram.

  2. Click the View/Materialized relationship icon on the erwin Toolbox, click the table you want to use as the source table for a materialized query table, and then click the materialized query table you created.

    A relationship is created between the source table and the materialized query table. By default, the materialized query table references all columns in the source table.

Note: You can add consecutive multiple materialized query tables by pressing the Ctrl key before you click the materialized query table tool. When you click again in the diagram window, another materialized query table is created.

More information:

Define the Properties of a Materialized Query Table

Specify the Materialized Query Columns

Specify the Source Tables for a Materialized Query Table

Specify Search Conditions for Generating the SQL Code for a Materialized Query Table

Specify General Physical Properties for a Materialized Query Table

Create User-Defined SQL Code for a Materialized Query Table