The Predicate Returns A Relation

We have seen that the predicate:

x is to the left of y

is mapped to the truth value TRUE when Charles is substituted for x and Genghis Khan is substituted for y.  The Relation TO_THE_LEFT_OF comprises all true propositions and only true propositions that get generated when values are substituted for x and y.  So the predicate is a function whose range is the truth value TRUE for every proposition that is included in the relation, and FALSE for every proposition that is not included in the relation.

I think, however, that we would get a slightly simpler account if we see the predicate as a function returning Relations comprising the single proposition TRUE, or the single proposition FALSE.  In the Relational Algebra, we would get a relation comprising the single tuple (and therefore proposition) TRUE if, after doing the Restriction that gives us:

Charles is to the left of Genghis Khan.

we then projected on the null set of attributes (“columns”).  We would then end up with Chris Date’s TABLE_DEE, that is, the Relation with cardinality 0 (o attributes, that is, 0 “columns”) and a single tuple.  TABLE_DEE is the Relation that corresponds to (I guess I should say ‘is identical with’) the weird classical logic proposition TRUE.  The predicate returns the proposition TRUE wrapped in the Relation TABLE_DEE when the Charles and Genghis Khan substitution is made.

Correspondingly, when John is substituted for x and Genghis Khan is subsituted for y, so that we get:

John is to the left of Genghis Khan.

the Restriction selects no tuple in the Relation TO_THE_LEFT_OF.  We then have a Derived Relation with a cardinality of 2 (i.e., the Relation has 2 “columns”) holding the null set of tuples.   If we then project on the null set of attributes, we end up with a Relation of cardinality 0 comprising 0 tuples.  Chris Date calls this Relation TABLE_DUM, and it holds the tuple, that is to say, the proposition FALSE.  The predicate returns the proposition FALSE wrapped in the Relation TABLE_DUM when the John and Genghis Khan substitution is made.

Thinking of the predicate as returning either TABLE_DEE or TABLE_DUM simplifies things a bit, because it means we never have to leave the Relational Algebra when modeling the predicate.  Everything gets explained in terms of just one set of operations, the operations of the Relational Algebra.





About Cliff Wirt

I am a banking DBA with various and sundry interests, including art, poetry, philosophy, music, languages, relational algebra, database administration, and blueberries. Don't forget the blueberries. Some of these interests tie in in surprising though usually tangential ways with database theory. Even the blueberries. I have published one article in a Philosophy Journal, and I have one painting in a corporate collection (housed in what used to be the Amoco building in Chicago). According to 12andMe, my paternal haplogroup is I2, my maternal H5. The Neanderthal percentage of my ancestry is 3%. My most famous ancestor is William Wirt (from whom I get my last name, though possibly not my Y chromosome), who defended the rights of the Cherokees before the Supreme Court, and ran for President in 1832, carrying one state. My homepage is at My FaceBook page is at My LinkedIn page is at View all posts by Cliff Wirt

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: