3 votes

Foreign key location

In the relational data model it is a good idea to avoid as much as possible nullable foreign keys. Assuming that each license has a holder, while a person can have a license or not, this means that ...
user avatar
  • 3,965
2 votes

Foreign key refencing multiple primary keys

A FOREIGN KEY constraint can only ever reference a single target table by design. Maybe partitioning or inheritance fits your use case? If not, here are possible workarounds: Without master table You ...
user avatar
2 votes

Foreign key location

License is in a total participation relationship with Person -- though it is not a weak entity (it has its own primary key, LicenseNumber), it cannot exist without a corresponding, single Person. To ...
user avatar
  • 21.2k
1 vote

Foreign key location

According to the diagram: The Person may have "zero or one" License The License must have "one and only one" Person Therefore ideally the foreign key should only be entered on ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible