Re: Ternary Relationship cardinality

From: Jan Hidders <hidders_at_gmail.com>
Date: 19 Sep 2006 02:54:59 -0700
Message-ID: <1158659699.311207.234100_at_d34g2000cwd.googlegroups.com>


miklesw_at_gmail.com wrote:
> Hi Jan,
>
> > The general rule is as follows: If you have a relationship R(a,b,c)
> > then you have to ask for each role, say 'a', how its cardinality
> > depends on the combination of the other two, in this case 'b' and 'c'.
> > If the upperbound is 1 then you put 1 on the corresponding edge in the
> > diagram, if there is no upperbound you put N or M there.
>
> Thanks for the insight...
>
> > Minor detail: if *every* child has two parents your database will
> > either be infinite or some will be their own descendants.
>
> Care to expand on this? Note that parents can come into existence by
> purchase, however since Children are a specialization of 'parent', they
> can also breed.

Ah, wait, now I understand your sub/superclass annotation. You say that Child is a subclass of Parent (btw. letting both be a subclass of Dog or whatever might be more logical) and a dog is in the class Child iff it has parents.In that case there is no problem.

  • Jan Hidders
Received on Tue Sep 19 2006 - 11:54:59 CEST

Original text of this message