TABLE_DUM and TABLE_DEE
TABLE_DUM and TABLE_DEE
The previous two sections were perhaps a little depressing; this section, by contrast, is much more upbeat. Recall from the section "Some Important Consequences" that the empty set is a subset of every set, and hence that there's such a thing as the empty tuple (also called the 0tuple), and of course it has an empty heading. What I didn't point out before is that—obviously enough—a relation too might have an empty heading (a heading is a set of attributes, and there's no reason why that set shouldn't be empty). Such a relation is of type RELATION{}, and its degree is zero. It's also sometimes said to be 0ary (or
nullary
), just as, for example, a relation of degree two is said to be binary. (By the way,
nullary
here has nothing to do with nulls; nulls are still bad news, but nullary relations are very good news indeed. However, I prefer to avoid the
Let
r
be a relation of degree zero, then. How many such relations are there? The answer: just two. First, of course,
r
might be empty (meaning it contains no tuples)—remember there's exactly one empty relation of any given type. Second, if
r
isn't empty, then the tuples it contains must all be 0tuples. But there's only one 0tuple!—equivalently, all 0tuples are duplicates of one another—and so
r
cannot possibly contain more than one of them. So there are indeed just two relations with no attributes: one with just one tuple, and one with no tuples at all. For
Now, you might well be thinking: "So what? Why on earth would I ever want a relation that has no attributes at all?" Even if they're mathematically respectable (which they are), surely they're of no
practical
significance? In fact, however, it turns out they're of very great practical significance indeed: so much so, that we have pet
NOTE
I'll discuss the whole notion of what relations in general mean in the
By the way, a good way to remember which is which is this: YES and DEE both have an "E"; NO and DUM don't.
I haven't covered enough in this book yet to show concrete examples of DUM and DEE in action, as it were, but we'll see plenty of examples of their use in the pages ahead. Here I'll just mention one point that should make at least intuitive sense at this early juncture: DEE in particular plays a role in the relational algebra that's analogous to the role
