Re: Base Normal Form

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Tue, 12 Jul 2005 22:17:55 GMT
Message-ID: <nkXAe.143443$Ts5.7590116_at_phobos.telenet-ops.be>


dawn wrote:
> Jan Hidders wrote:
>

>>dawn wrote:
>>
>>>Jan Hidders wrote:
>>>
>>>
>>>>dawn wrote:
>>>>
>>>>
>>>>>Jan Hidders wrote:
>>>>>
>>>>>
>>>>>>It's really not a good idea to confuse the concept of
>>>>>>relation and function.
>>>>>
>>>>>I definitely agree!
>>>>
>>>>And yet that seems to be the consequence of what you are proposing. I
>>>>could be wrong but I interpreted your suggestion as that every relation
>>>>with a candidate key is a function.
>>>
>>>Yes, that is what I am saying, but I'll try to say it better.
>>
>>Ok. That might well solve it because basically my point was that your
>>terminology was too sloppy for my taste. 

>
> I'll accept that. When applying a mathematical model within a field
> that has taken mathematical terms and given them new definitions is
> problematic.

Oh, come on, Dawn. Really! It is quite clear that there is a close relationship between a relation as defined in the relational model and the usual mathematical notion of relation. Just take a look in the "Foundations of databases" book by Abiteboul, Hull and Vianu. (That's a graduate text I usually recommend to PhD students.) They happily switch between the two definitions and use whichever one is most practical for the thing they want to present in the full knowledge they could use either of them.

> A candidate key of a relation could be modeled as the
> domain of a function -- gotta love language, eh?

That's still way too sloppy and I think you can do better than that.

>>>Every database relation that has a candidate key can be modeled as a
>>>mathematical function as well.
>>
>>Sure. But let me emphasize once more that *every* database relation has
>>at least one candidate key. This is not up for discussion, it's a simple
>>mathematical fact.

>
> I'll buy that it is a fact by definition. That is yet another way that
> the term "relation" has been butchered. If every database relation has
> at least one candidate key, then if we choose to model that relation as
> a mathematical relation, then our mathematical relation has candidate
> keys.

Mathematical relations also have always at least one candidate key, but here you represent them as a set of numbers instead of a set of column names. For every mathematical relation it is true that there is a set of   positions such that no two distince tupels in the relation have the same values in these positions.

>>>Did that clarify?  Does it make sense?  Do you accept it?
>>
>>I have no problem with statements like "I can model every relation with
>>a candidate key CK as a function that maps a value for the CK to a tuple
>>of that relation". 

>
> And that is what I'm saying with the additional statement that I find
> it useful to do so.

I also have no problem with the additional statement. :-)

>>But for me that is very different from saying that
>>the two concepts are the same. 

>
> I'm not sure if/where I might have said that. My intent was to answer
> the question of what else people might call this idea of "base normal
> form" when teaching these concepts once you have a table and at least
> one candidate key. I use the term "function" and show how you have a
> function mapping key values to tuple values. This makes the concepts
> very simple, perhaps too simple for some.

How about "a relation is a set, so every tuple in it occurs at most once". Is that too difficult for you? :-)

>>Note by the way that the link between functional dependencies and
>>interpreting relations as functions is very close. If the relation
>>R(A,B,C,D,E) has the dependencies AB->C and BD->E and ABD->C the I
>>wouldn't say it represents a function, I would say it represents three
>>functions. 

>
> YES, YES, YES -- SO WOULD I!!! It's all about functions and it's all
> about data (so can we drag that "relations" word to the trash when
> introducing these concepts and make it simple?)

I'm sorry? Explaining the relational model gets simpeler if you don't use or define the word "relation"?

  • Jan Hidders
Received on Wed Jul 13 2005 - 00:17:55 CEST

Original text of this message