Upon generating an entity-relationship diagram of my database I observed several occurrence like this:
This diagram (in IDEF1X notation) shows the following:
- Our team's DB convention is that each primary table (i.e., not an association-type table) has its own unique primary key called
db_id
. iam_projects.db_id
is a foreign key iniam_project_rules
(theproject_id
field), hence the connecting line.iam_projects.db_id
is not part of the primary key ofiam_project_rules
(hence the dotted line style).- A given
iam_projects.db_id
may appear zero or more times iniam_project_rules
(hence the solid circle on the right end of the connecting line).
Now, here's what my question is about. As I understand the notation, the diamond on the left end of the connecting line changes the left side from "one" to "zero or one". In words, that posits this claim to be true:
There may exist a row in
iam_project_rules
whoseproject_id
does not appear iniam_projects
.
But if iam_project_rules.project_id
is a foreign key to iam_projects
, which it is, then that claim must be false.
Where is the error in my analysis or assumptions?