Re: Relation problem

From: Michel <microworld_at_sympatico.ca>
Date: Mon, 29 Jan 2001 19:08:10 GMT
Message-ID: <ucjd6.147837$JT5.5303148_at_news20.bellglobal.com>


I'm afraid I don't quite understand supertypes. From the code snip Mike included, I notice you can have AND in the constraint definition, but can you have an "OR".

Michel

Kristian Damm Jensen <kristian-Damm.Jensen_at_REMOVEcapgemini.dk> wrote in message news:3A6C2EB3.B1A489B6_at_REMOVEcapgemini.dk...
> Jan Hidders wrote:
> >
> > wrote:
> > > On 21 Jan 2001 00:26:30 GMT, hidders_at_REMOVE.THIS.win.tue.nl (Jan
> > > Hidders) wrote:
> > >
> > > >I am afraid that these magic words also don't make the problem go
> > > >away. :-)
> > >
> > > Depends on what the problem really is. See below.
> > >
> > > >This supertype is a generalization of Individuals and Organizations.
> > > >That means that every Party is either an Individual or an
 Organization.
> > >
> > > It means that one table, Parties, takes the place of the tables
> > > Individual and Organization at their original level of abstraction.
> > > Attributes common to individuals and organizations move from those
> > > tables into the table Parties.
> > >
> > > It also means that one FK for the table of party addresses no longer
> > > comes from either of two domains (Individuals or Organizations), it
> > > comes from just one--the table Parties.
> >
> > Of course, but it also means that you will still have two tables Indiv.
> > and Organ. that contain the class specific attributes and a foreign key
> > to the Parties table. And the reverse of this foreign key is a "split
> > foreign key".
>
> Correct. That is inherent in the nature of the data and can not be
> avoided.
>
> What can be avoided is some of the performance problems. Without the
> supertype referential integrity from Adresses to Individuals and
> Organizations can not be maintained using an index. With Parties it can.
>
> Ah, you say, but then you will just move the problem on to maintaing
> referential integrity between Parties and Individuals/Organizations. But
> as this will not be updated (!) the is reduced to deletion and
> insertion, which I believe will happen much more infrequently.
>
>
> --
> Kristian Damm Jensen | Feed the hungry. Go to
> kristian-damm.jensen_at_capgemini.dk | http://www.thehungersite.com
>
>
Received on Mon Jan 29 2001 - 20:08:10 CET

Original text of this message