Creating Models › Target Servers for Physical Models › Database Property Editors › Materialized Query Tables › Add a Materialized Query Table
Add a Materialized Query Table
You use the Materialized Query Tables editor to add a materialized query table.
To add a materialized query table
- 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.
- 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.
- You can drag one or more columns from a table into a materialized query table. Select in the erwin Toolbox. Drag the table column that you want to include from the source table into the materialized query table. The materialized query column references and the associated relationship are created.
- You can rename a materialized query table. Select in the erwin Toolbox, click the materialized query table you want to rename, wait a moment, and click the materialized query table again. Then, enter the new name for the materialized query table. Or, right-click a materialized query table in the Model Explorer, select Properties to open the Materialized Query Tables Editor, and enter the new name in the Name box.
- You can also add a materialized query table using the Model Explorer. Right-click the Materialized Query Tables icon and select U.
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
Copyright © 2017 erwin Inc.
All rights reserved.
|
|