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

From: Rene de Visser <Rene_de_Visser_at_hotmail.de>
Date: Tue, 30 Nov 2004 10:40:00 +0100
Message-ID: <cohf5h$t27$1_at_news.sap-ag.de>


"Costin Cozianu" <c_cozianu_at_hotmail.com> wrote in message news:311b0fF35fc3vU1_at_uni-berlin.de...
> Rene de Visser wrote:
> It makes big logical difference with regards to one very important
> criteria: Economy of Expression.
>
> In other words why should you say
>
> -> select street1,street2, city, state,zip, country from users
>
> when you can simply say
>
> -> select address from country
>
> That's one of the reasons you have complex type in the first place in
> common languages, otherwise languages without complex type are
> computationally just as powerful. Anything that can be expressed using
> complex type can be expressed with simple type by unfolding a large
> number of variables.
>
While I get what your saying, your example does not show this because your two statements do completely different things.

Under Model1 it should be

select address_id from country

and under model2 it should be

select address from country

They look pretty similar to me.

i.e. your first select is also extracting the components/ related variables from the address, which your second select is not doing. They are not equivalent and so can not be compared.

A different example is when you want to have multi-dimensional versiong on about 100 relations. You want to use the same machinary to update and read all relations. However complex types don't help with this. Or not in any way I could find, as you have to take the other key fields and tuples into account.

Rene. Received on Tue Nov 30 2004 - 10:40:00 CET

Original text of this message