Business Intelligence Tutorial

Defining foreign keys in the Data Warehouse Center

In this section, you will define foreign keys in the Data Warehouse Center.

To define foreign keys into your data warehouse:

  1. In the Data Warehouse Center window, expand the Warehouse Target tree.
  2. Expand the Tutorial Targets tree until you see Tables folder.
  3. Right-click on the FACT_TABLE table.
  4. Click Properties.

    The table Properties notebook opens.

  5. Click the Warehouse Foreign Keys tab.
  6. 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.
  7. Right-click on the white space and click Define. The Define Warehouse Foreign Key window opens.
  8. Select IWH in the Object schema list.
  9. Select LOOKUP_MARKET in the Object name list. The primary key for LOOKUP_MARKET appears in the Warehouse primary key field.
  10. Select CITY_ID in the Available columns field.
  11. Click > to move CITY_ID into the Warehouse foreign key columns field.
  12. 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"

  13. Click OK to save your definition and close the Define Warehouse Foreign Key window.
  14. Repeat steps 7 to 13 to add foreign keys for the remaining three LOOKUP tables.
  15. Click OK to save your changes and close the table Properties window.


[ Top of Page | Previous Page | Next Page | Table of Contents ]