Unary
Unary
On the Job
manages
Supervisor
is managed by
Worker
The Family
marries
Husba nd
is married to
Wife
fathers
is child of
C hild
is child of bears
supervises supervised by
related to is relative of
An entity can be related to itself. Called a unary or recursive relationship Where do you put the foreign keys?
Unary 1:M
Emp lo y ee Emp lo y eeID La st N a me First N a me M id N a me S u p erv iso rID [ FK ]
supervises supervised by
Recursive foreign key placed in entity Name of FK must be different from name of PK Second instance of entity required in queries and relationships screen
In t erp ersR ela t R ela tio n sh ip Ty p e R ela tio n sh ip N a me R ela tio n sh ip D esc
is source of contains
R ela tio n sh ip [A s] is of type Fro mPerso n [ FK ] describes To Perso n [ FK] R ela tio n sh ip Ty p e [FK ] Fro mD a t e To D a te
Name of FKs must be different in associative entity Second instance of entity required in queries and relationships screen
Bill of Materials
products composed of other products
Political Geography
Precincts within cities within counties within states within countries within continents
Instead
A single record that records both directions of the relationship
A Relationship Type table is created to hold both forward and reciprocal terms for the relationship
There is only one relationship record for persons 1 and 2, but both directions of the relationship are returned