Re: Logical equivalence of simple and complex types under the relational model?
Date: Wed, 1 Dec 2004 17:16:43 +0100
Message-ID: <cokqpc$9i8$1_at_news.sap-ag.de>
"Costin Cozianu" <c_cozianu_at_hotmail.com> wrote in message
news:3167cfF379ukqU1_at_individual.net...
> Rene de Visser wrote:
> > "Costin Cozianu" <c_cozianu_at_hotmail.com> wrote in message
> > news:314pe5F371n2cU1_at_individual.net...
> >
> >
> >>If you have to unravel the 7 components into individual variables, then
> >>you're right: non economy is done. But some computations can pass the
> >>entire complex value to let's say another function. And you wouldn't
> >>want that function to have 7 parameters instaed of one, would you ?
> >
> >
> > No, under model 1 I would pass address_id
> > and under model 2 I would pass address
> >
>
> But under model 1 address_id is superfluous. It is an entity that is
> entirely unnecessary !!! Plus you'll pass an address_id to the function
> and that function has to look in some global_addresses table. You
> increased the coupling and put entirely gratuituous constraints on the
> design.
> Maybe I don't want to have a global_addresses table with some ridiculous
> address_id to take care of.
[Aside: the address_id is not a pet. It can look after itself, or the DBMS
can look after it]
> self-identifying. If you have the number 3 you don't need an 3_ID for it
> to identify. So if you have the address ((zip 1234) (street "X no 4")
> (country "USA")) that's your value right there, just like the value 3.
Theres no need to have identity for complex type instances. But then I would claim that you need equivalence classes, and that these are effectively the same.
> The difference is by construction. Types are constructed according to an
> algebra of types (type system) starting from primitive values (bool,
> int, char, string, etc).
What do you think he means by nondecomposable by the database system?
>
> Types that are derived from other types using composition operators
> (ARRAY, RECORD, UNION, "->", etc) are composite types.
Are then the complex types indistiguishable from atomic types in the RM system?
Aside:
We take the union of these two types and get the integers with the operator
add 2.
Is this a composite type?
Rene. Received on Wed Dec 01 2004 - 17:16:43 CET