Business Intelligence Tutorial

Defining a primary key

In this exercise, you will define a primary key for the LOOKUP_MARKET, LOOKUP_TIME, LOOKUP_PRODUCT, and LOOKUP_SCENARIO target tables.

To define the primary keys:

  1. Go to the Control Center window.
  2. Click View -> Refresh
  3. Find the LOOKUP_MARKET table in the list of tables for the TUTWHS database. Right-click the table and click Alter.

    The Alter Table notebook opens.

  4. Click the Primary Key tab. The Primary Key page opens.
  5. In the Available columns list, select CITY_ID as the primary key.
  6. Click > to move CITY_ID to the Primary key columns list.
  7. Leave the Constraint name field empty, so that DB2 Universal Database will generate a constraint name for you. A primary key can be considered a constraint, because all values in the selected column must be unique.
    The GEOGRAPHIES SELECT statement on the SQL Statement page.
  8. Click OK to save your definition.

Follow the same steps to define primary keys for the other target tables. Define:


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