ON RELATIONS AND TUPLES
with C. J. Date

 

 

 

 

From: CW

To: Editor

Date: 1 May 2004

 

I have much enjoyed reading AN INTRODUCTION TO DATABASE SYSTEMS, as well as material posted on dbdebunk and The Third Manifesto (TTM). Keep up the good work!

 

I do have some issues that I have been thinking about, namely Tuples, Tuple Types and Tuple Variables (TTM). Why do we need Tuples? As I perceive things they are not necessary in order to define Relations.

 

Consider a Relation Value RV. A Relation Value RV consists of a Heading and a Body:

 

·         The heading is the set of pairs { <A1,T1>,<A2,T2>,,,<An,Tn> }, named Attributes An of some Type Tn.

·         The body is a set of tuples { TV1,TV2,,,TVn } each with the same heading as RV.

 

However, we could define the Body of RV as:

 

·         A set of Relation Values { RV1,RV2,,,RVn } each with the same heading as RV, such that RV = RV1 U RV2 U ... U RVn.

·         If each of the Relation Values RV1,RV2,,,RVn has Cardinality 1, we could speak of Tuple Values.

 

Speaking frankly:

 

·         A Relation Variable R is the definition of a truth predicate.

·         A Relation Value RV is a set of truth statements in accordance with predicate (R).

·         If we Isolate a single member from the set of truth statements in RV we could consider this as

a) a RELATION with Cardinality 1 ( restrict )

b) a TUPLE ( ? )

 

It would be more correct to see tuples as just relations with cardinality 1. And there is no inherent value of defining a TUPLE Type.

 

Example:

 

Let’s define relation RV to have heading: {<A1,T1>,<A2,T2>,,,<An,Tn>}

Let’s define relation RV to have body: {{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>},{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>},,,{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>}}

 

Here are 2 examples how to construct the body of relation RV from 1)Tuples, 2)Relations.

 

Example TUPLES:

 

TV1 = {<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>}

TV2 = {<A1,T1,v1'>,<A2,T2,v2'>,,,<An,Tn,vn'>}

TVn = {<A1,T1,v1''>,<A2,T2,v2''>,,,<An,Tn,vn''>}

(body of) RV = {TV1,TV2,,,TVn}

(body of) RV = {{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>},{<A1,T1,v1'>,<A2,T2,v2'>,,,<An,Tn,vn'>},,,{<A1,T1,v1''>,<A2,T2,v2''>,,,<An,Tn,vn''>}}

 

Example RELATIONS:

 

RV1 = {{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>}}

RV2 = {{<A1,T1,v1'>,<A2,T2,v2'>,,,<An,Tn,vn'>}}

RVn = {{<A1,T1,v1''>,<A2,T2,v2''>,,,<An,Tn,vn''>}}

RV = RV1 U RV2 U ... U RVn

(body of) RV = {{<A1,T1,v1>,<A2,T2,v2>,,,<An,Tn,vn>},{<A1,T1,v1'>,<A2,T2,v2'>,,,<An,Tn,vn'>},,,{<A1,T1,v1''>,<A2,T2,v2''>,,,<An,Tn,vn''>}}

 

Conclusion: Relation Types are sufficient in themselves and Tuple Types are not necessary for the definition of a Relation.

 

So again: What do we need tuple Variables for? Really?

 

 

C. J. Date Responds: Thanks for your kind words and encouragement regarding the books and the websites.  Now, you ask why we need tuple variables.  Well, I'm sure you know that a given formal system can be set up in several distinct but equivalent ways, in general (distinct sets of axioms can give rise to the same logical system).  Thus, it might be possible to define relations without invoking the concept of a tuple, as you suggest.  But as soon as we say the body of a relation is a set--and you do agree with us that it is!--it seems to me the natural question to ask is:  A set of what?  Answer:  A set of tuples.  (It's certainly not a set of relations, by the way--not even relations of cardinality one.  If it were a set of relations as you suggest, then where does your recursive definition stop?)  Moreover, a tuple, like a relation, is a value.  Every value is a value of some type.  Ergo, we must have tuple types.  For every type, we must permit variables of that type.  Ergo, we must permit tuple variables.  I think that's all I need to say.

 

 

Posted 07/30/04