Re: Logical equivalence of simple and complex types under the relational model?

From: Alfredo Novoa <anovoa_at_ncs.es>
Date: Thu, 02 Dec 2004 01:57:34 +0100
Message-ID: <82qsq058rjtm3n97bs19ks1irt09mgmtqc_at_4ax.com>


On Mon, 29 Nov 2004 18:39:15 +0100, "Rene de Visser" <Rene_de_Visser_at_hotmail.de> wrote:

>I have read a number of papers that discuss whether complex data types
>should be allowed under the relational model.

We should define "complex data type" first.

If you are talking about the typical capabilities for defining custom types of the modern languages then I completely agree.

SQL "domains" are a joke.

>I came to this thought by looking at some simple examples. And noting in
>some relational programming that it appears to be only a question of
>physical storage allocation whether to use complex types or not.

If we are talking about models we must ignore everything about the physical level.

>1.B We have three fields: day, month, year which may be present in a
>relation.
>
>2.B. We have a complex type: date. Similar to above we have functions day,
>month, year. Using these relations for every relation in 1.B we can
>construct an updatable view that maps to the relation above in 1.B. This
>construct view behaves exactly the same as the view/relation defined in 1.B
>above.
>
>Again no difference between 1.B and 2.B at the logical level.

IMO what you mean here is that there are not semantic diferences.

Of course there are logical differences because queries that work with 1.B don't work with 2.B. They are different logical designs, but both represent the same real world facts.

Regards Received on Thu Dec 02 2004 - 01:57:34 CET

Original text of this message