To create a relationship in diagram view, Control-drag from a source attribute to a destination attribute, as shown in Figure 5-4.
Figure 5-4 Control-drag from source key to destination key to form a relationship
The cardinality of the relationship is determined by the primary key characteristic of the destination attribute. If the destination attribute is the entitys primary key, the relationship is modeled as a to-one relationship. If the destination attribute is a foreign key, the relationship is modeled as a to-many relationship.
Control-dragging to form a relationship actually creates two
relationships: one in the source attributes entity and an inverse
relationship in the destination attributes entity. In Figure 5-5,
Control-dragging from Person.personPhotoID (a
foreign key) to PersonPhoto.personPhotoID (a
primary key) creates a to-one relationship from the Person entity
to the PersonPhoto entity and a to-many relationship from the PersonPhoto
entity to the Person entity.
Figure 5-5 Control-dragging also creates an inverse relationship
In Figure 5-5, the single line indicating the relationships between the Person and PersonPhoto entities should not be mistaken for a bidirectional relationship, which is not possible in the object-relational model. It is actually two relationships but when you create a relationship in diagram view, it appears as a single line.
For the personPhoto relationship,
it doesnt make sense for the inverse relationship (persons in
PersonPhoto) to be a to-many relationship. You can make it a to-one relationship
in the Relationship Inspector as well as set other characteristics
of the relationship. The Relationship Inspector is described in
detail in Forming Relationships in the Inspector and Forming Relationships Across Models and Data Sources.