Linking two tables

Tables are linked through their primary keys and foreign keys. The primary key of one table is defined as the foreign key of the other table.
Before you begin
Prerequisite: One of the tables must have a primary key.
About this task
To link two tables:
  1. Start IBM® InfoSphere™ Data Architect and load the data model.
  2. Right-click the table where you want to create the link and click Add Data Object > Foreign key.
  3. Select the table to link to.
  4. Type a name for the foreign key.
  5. In the Properties view, click the Details tab, click the Browse button, select the column to which you want to assign the foreign key, and click OK.
  6. In the Project Explorer view, right-click the table where you added the foreign key and click Generate DDL.
  7. Make sure to select the following options: Fully qualified names, CREATE statements, COMMENT ON statements, and IN TABLESPACE clause.
  8. Click Next.
  9. Make sure to select the following options: Check constraint, Foreign key constraint, Primary key constraint, and Tables.
  10. Click Next.
  11. Select Run DDL on server, click Next, select the data warehouse connection, and click Next.
  12. When prompted, type the user name and password for the database connection.
  13. Click Finish.

Feedback