You can create a foreign key relationship
from a parent entity
to a child entity in a logical data model diagram.
To create a foreign
key relationship:
- 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
entities. 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 entity is
related
to only one row in the other.
- Many-to-many
- This represents the relationship between two entities in which
each row
in one entity can be related to more than one row in the other entity.
For
example, each person in an EMPLOYEE table can have multiple projects
in a
PROJECT table, and multiple people can work on a project.
- Select the parent entity, which has
the primary key.
- Drag to the child entity. Depending on the type
of relationship you are creating, a pop up window might open asking
you to
specify relationship options.
The
key is migrated from the parent entity to the child entity.