[Info-ingres] Nonidentifying/optional relationship with NULL FK?

Roy Hann specially at processed.almost.meat
Fri Dec 21 12:52:37 UTC 2018


nikosv wrote:

> Searching for "non-identifying relationship where the FK can be null" I
> stumbled upon the "Nonidentifying/optional" part on page 279 of the book
> "Beginning Relational Data Modeling"
 
 [snip]
 
>  Is that a valid point? Is it something you came across or have used it?

Any time you have a nullable attribute in any table you have to suspect
conflation of fact types. That is, two or more kinds of fact are
being jammed into one table. The identifying/non-identifying guff is a
misguided attempt to paper over the problem, or pretend it's
respectable, or to profit from not drawing attention to the fact it is
a problem. (IDEF1X: I'm talking to you.)

There's all kinds of reasons people do it. Some forgiveable; many not.
If SQL supported distributed key constraints I'd find it easier to rant
against designs that feature nullable FKs. But it doesn't so I don't.

Roy

PS: There is nothing in the passage you link to that depends on the key
being primary. There is no reason you can't prefer one key among
multiple candidates, but the concept doesn't care which key you prefer
and the attempted explanation shouldn't imply that it does. I would pay
no attention to a book with such errors in it.






More information about the Info-ingres mailing list