Primary Key to Foreign Key Column Connection Strategy Guide
The Primary Key to Foreign Key Column strategy connects tables according to a few general rules. Knowledge of these rules can make it easier to lay out your diagram. This guide will explain when which edge of a parent or child table is used.
Determining the Parent Table and Child Table Edge to Use
If the parent table's western edge is further west then the child table's western edge, the parent table's eastern edge is used in the connection. The connection then connects to the child's eastern or western edge depending on which one is the shortest distance away. The following diagram illustrates this with three scenarios where the parent is further west then the child.
Parent Table Further West than Child Table
If the parent's western edge is further east of the child's western edge, then the parent's western edge is used. The next diagram shows three of these scenarios.
Wide Parent Table Exception
An exception to the above rule is when the parent table is wider than the child table and is directly below or above the child table, as show in the following diagram.
In this case the parent's western edge is used, even if the parent is further west then the child.
Looped Connection
A looped connection can occur if the horizontal gap between the connected tables is not wide enough to render both the joint glyphs. This is shown in the the diagram below
This can be corrected by moving the tables further apart.
See also: