Re: Modelling Disjoint Subtypes

From: <vjkmail_at_gmail.com>
Date: 24 Mar 2007 19:17:57 -0700
Message-ID: <1174789077.469649.236060_at_o5g2000hsb.googlegroups.com>


On Mar 24, 9:25 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:
> On Mar 24, 11:26 am, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
>
>
>
> > "Marshall" <marshall.spi..._at_gmail.com> wrote innews:1174761278.831402.100630_at_y66g2000hsf.googlegroups.com:
>
> > > On Mar 24, 9:04 am, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
>>
> > >> In other words, under what circumstances, other than an attempt to
> > >> emulate object oriented viewpoint, "R <x, y>; R1 <super R, z>; R2
> > >> <super R, w>" is 'better' than just "R1<x,y,z>, R2<x,y,w>" ? What is
> > >> achieved by such decomposition ? Clearly, there is no data
> > >> redundancy because R1 and R2 are disjoint !
>
> > > If there is no constraint separating R1<x, y> with R2,<x,y>, then
> > > they are *not* disjoint.
>
> > When I said "because R1 and R2 are disjoint", I implied that there is a
> > constraint of course, e.g.: "R1 join R2 is_empty" or similar, as there
> > would be with the three relvars !. Having dealt with that diversion,
> > back to the original question: "under what circumstances, other than
> > an attempt to emulate object oriented viewpoint, "R <x, y>; R1 <super R,
> > z>; R2 <super R, w>" is 'better' than just "R1<x,y,z>, R2<x,y,w>" ? What
> > is achieved by such decomposition ?"
>
> Okay.
>
> One often wants to consider all the different sub-entities together.
> If one has ten different disjoint types, and one wants to count
> them, having a table for the common attributes means the
> count() can be done with a single table, vs. a join of ten tables.

What is the problem with count(union(R1,..,R10)) vs. count(R) ? It is just a minor syntactic inconvenience, isnt't it ?

>
> On the other hand, if one has a query that needs both common
> and unique attributes, that query would require two tables vs.
> just one if we didn't have the common attributes in a supertype
> table.

Right.

>Anyone have any other considerations?

I wonder ...

>
> > I am not sure I understand the relevancy of your appeal to functional and
> > OOP point of view.
>
> You asked about the relevance of disjoint subtypes;

I did not ask about usefulness of disjoint subtypes in some general sense, I was curious about whether anyone can provide a compelling example of using the entity subtype in relational modelling. Let's not dwell on other uses for the type, it's not really relevant unless of course you think the OO data 'modelling', a.k.a. network data model, can offer something interesting

>I was
> pointing out how the construct appears in a wide variety
> of computational models.
>
> Marshall
Received on Sun Mar 25 2007 - 04:17:57 CEST

Original text of this message