O'Reilly logo

Relational Theory for Computer Professionals by Chris Date

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. TABLE_DUM and TABLE_DEE

Tweedledum and Tweedledee Agreed to have a battle; For Tweedledum said Tweedledee Had spoiled his nice new rattle. Just then flew by a monstrous crow As big as a tar-barrel; Which frightened both the heroes so, They quite forgot their quarrel.

old English nursery rhyme, quoted by Lewis Carroll in Through the Looking-Glass and What Alice Found There (1871)

As noted in Chapter 3, the empty set—the set that contains no elements—is a subset of every set. It follows in particular that the empty heading is a valid heading, and hence that a tuple with an empty set of components is a valid tuple. Such a tuple is of type TUPLE { }; indeed, it’s sometimes referred to explicitly as a 0-tuple, in order to emphasize the fact that it has no components and is of degree zero. It’s also sometimes called an empty tuple. In Tutorial D, it’s denoted thus:

TUPLE { }

Note: The syntactic construct TUPLE { } thus does double duty in Tutorial D. However, the intended interpretation is always clear (and unambiguous) from context.

It follows further from the above that a relation too can have an empty heading. Such a relation is of type RELATION { }, and its degree is zero. In Tutorial D, such a relation can be denoted thus:

RELATION { } body

Here the braces denote the empty heading, and body is either { } or {TUPLE{ }}—see the explanation immediately following, also Appendix A.

Let r be a relation of degree zero, then. How many such relations are there? The answer is: Just two. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required