Business Intelligence Tutorial
In this section, you will define foreign keys in the Data Warehouse
Center.
To define foreign keys into your data warehouse:
- In the Data Warehouse Center window, expand the Warehouse
Target tree.
- Expand the Tutorial Targets tree until you see
Tables folder.
- Right-click on the FACT_TABLE table.
- Click Properties.
The table Properties notebook opens.
- Click the Warehouse Foreign Keys tab.
- Right-click on the Constraint name of the first foreign key in
the view and click Remove. Do this for each foreign key in
the view. These foreign key definitions were carried over when the Fact
Table Join step was copied. They refer to tables in the TBC Sample
Targets and need to be deleted and replaced with new foreign keys that refer
to tables in the Tutorial Targets.
- Right-click on the white space and click
Define. The Define Warehouse Foreign Key window
opens.
- Select IWH in the Object schema list.
- Select LOOKUP_MARKET in the Object name list.
The primary key for LOOKUP_MARKET appears in the Warehouse primary
key field.
- Select CITY_ID in the Available columns
field.
- Click > to move CITY_ID into the Warehouse foreign key
columns field.
- In the Constraint name field, type:
"Whse Market FK"
The constraint names must be different for each foreign key. The
constraints for the remaining three LOOKUP tables are shown in the table
below.
Table
| Constraint name
|
LOOKUP_TIME
| "Whse Time FK"
|
LOOKUP_PRODUCT
| "Whse Product FK"
|
LOOKUP_SCENARIO
| "Whse Scenario FK"
|
- Click OK to save your definition and close
the Define Warehouse Foreign Key window.
- Repeat steps 7 to 13 to add foreign keys for the remaining three
LOOKUP tables.
- Click OK to save your changes and close the table Properties
window.
[ Top of Page | Previous Page | Next Page | Table of Contents ]