You can manage the way you view workbooks, what types of objects are included in workbooks, and the relationships between database tables.
Many workbook commands are available on the context menu for a workbook and its subfolders. See the DB2 QMF Visionary Getting Started Guide for more information.
Workbooks have the following types of options:
See Workbook display options and Workbook import options for the lists of options.
Set display options on the Display page of the Workbook Options dialog box. Display options take effect immediately. The following table lists the display options you can modify for a workbook.
Display options | Description |
---|---|
Sort data node by | Object type classifies data into subgroups of tables, views, and synonyms. Object name sorts tables, views, and synonyms alphabetically. |
Show owners as tree nodes | Sorts data, functions, and data types according to the owner name and displays separate nodes for each owner. |
Include owner name in tree | Displays the owner of the database object as part of the object name. |
Show Data node in tree | Allows you to display the Data node in the workbook tree. If the check box is clear, the tables, views, and synonyms are displayed directly under the workbook name and do not reside in a Data folder. |
Show types in tree | Displays the data types in the Workbooks page. |
Show functions in tree | Displays the functions on the Workbooks page. |
Set import options on the Import page of the Workbook Options dialog box to modify the defaults used the next time the Workbook wizard is launched.
The following table lists the import options you can modify for a workbook.
Display options | Description |
---|---|
Data objects | Select the object types to include. |
Functions | Select the types of functions to include. |
Additional options | Select the options to include: system objects, objects owned by a particular owner, primary and foreign key relationships, and inferred relationships. See Managing table relationships in a workbook for a definition of any inferred relationship. |
You can use your workbook to define relationships between tables and use those relationships when creating query joins. Based on these table relationships in your workbook, the Query editor can automatically create visual links between columns when you insert related tables into the Query Diagram view.
When you import a workbook, you can include the primary and foreign key definitions in the tables. Columns defined as primary keys are identified in a workbook by a key icon, similar to the symbol primary key shown below.
You can define these types of table relationships:
An inferred relationship between tables occurs when one table contains a primary key definition and another table has a column of the same name and data type. You can create inferred relationships by selecting the Infer relationships between tables option when importing or creating a workbook.
Typically, tables in a database have explicit relationships based on the primary and foreign keys, which must be of the same data type. For example, a customer table might have the cust_id column as the primary key, and the orders table might have cust_id as the foreign key column. You can create explicit table relationships using the Relationships page of the Table Properties dialog box (right-click the table in the World Manager and click Properties).