Re: sql tables

From: paul c <>
Date: Thu, 11 Oct 2007 17:16:23 GMT
Message-ID: <HTsPi.14038$Da.12746_at_pd7urf1no>

David Cressey wrote:
> "paul c" <> wrote in message > news:EbrPi.13483$Da.2157_at_pd7urf1no... ...
>> Also wondering about "i-th" values in rows. Does the above also mean that
>> TableB:
>> ColumnA ColumnB
>> 1 2
>> is not equal to
>> TableC:
>> ColumnB ColumnA
>> 2 1
>> (all other things being equal)?

> The question is moot.  Table B and Table C have different headers, even
> though they contain the same columns.  a row  with values {2, 1} inserted
> into TableB would be different from the row that's already there.
> ...

Another quote I have here is from Codd, 1970:

"The term relation is used here in its accepted mathematical sense. Given sets X1 , S, , . . . , S, (not necessarily distinct), R is a relation on these n sets if it is a set of ntuples each of which has its first element from S1, its second element from Sz , and so on. We shall refer to Si as the jth domain of R. As defined above, R is said to have degree n. Relations of degree 1 are often called unary, degree 2 binary, degree 3 ternary, and degree n n-ary. For expository reasons, we shall frequently make use of an array representation of relations, but it must be remembered that this particular representation is not an essential part of the relational view being expounded."

I get the feeling that the SQL originators ended up describing Codd's description rather than what he was describing! I don't know if this is accurate historically but when I compare Codd's paragraph to the SQL standard section 4.9 the last sentence especially, makes me darned suspicious.

OTOH the standard doesn't seem to mention Codd's name, nor the term "relation", so I guess it's possible that those originators might have been intending to make something quite different from his idea, eg., their idea of multisets/duplicates does seem to eliminate a user interpreting a table as a set of logical propositions. I guess also that means Codd's Information Principle doesn't apply in SQL. If I've got that right, they didn't intend to implement Codd's idea and I oughtn't to criticize SQL for being a poor implementation it, but I still think they could be criticized for not implementing it at all! Received on Thu Oct 11 2007 - 19:16:23 CEST

Original text of this message