Creating a foreign key relationship from a parent table or view to a child table

You can create a foreign key relationship from a parent table or view to a child table in a physical data model diagram.

Procedure

To create a foreign key relationship:

  1. Select a type of relationship in the palette. You can select the following types of relationships:
    Identifying
    In an identifying relationship, the existence of the child entity is dependent on the parent. For example, EMPLOYEE can have an identifying relationship with WORKCOMPLETED.
    Non-Identifying: Optional, Mandatory, or One-to-One
    Non-identifying relationships are relationships between two independent tables. For example, CUSTOMER can have a non-identifying relationship with INVOICE. You can specify whether these relationships are enforced (mandatory) or not enforced (optional). You can also specify that the relationship is a one-to-one relationship, in which case each row in one table is related to only one row in the other table.
    View Relationship
    This represents the relationship between the following data objects:
    • A view and a table
    • A view and a view
    • A view and a materialized query table
    • A materialized query table and a table
  2. Select the parent table that has the primary key, or select a view to create a view relationship.
  3. Drag to the child table or view. Depending on the type of relationship you are creating, a window may open to let you specify relationship options.

Results

The key is migrated from the parent table or view to the child table or view.

Feedback