Chapter 4. No Duplicates, No Nulls
I haven’t even mentioned yet the way the silly notions Discussed so far interreact and lead us into oceans Of complication and despond and general distress. Are two nulls equal (duplicates)? I fear, both NO and YES.
In the previous chapter, I said the following (approximately):
Relations never contain duplicate tuples, because the body of a relation is a set (a set of tuples) and sets in mathematics don’t contain duplicate elements.
Relations never contain nulls, because the body of a relation is a set of tuples, and tuples in turn never contain nulls.
I also suggested that since there was so much to be said about these topics, it was better to devote a separate chapter to them. This is that chapter. Note: By definition, the topics in question are SQL topics, not relational ones; in what follows, therefore, I’ll use the terminology of SQL rather than that of the relational model (for the most part, at any rate).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access