Re: Nested Sets And Pedigrees

From: Jan Hidders <hidders_at_uia.ua.ac.be>
Date: Fri, 12 Apr 2002 09:47:34 +0200
Message-ID: <3cb690a1$1_at_news.uia.ac.be>


"Paul Tiseo" <123tiseo.paul_at_123mayo.edu (drop the numbers)> wrote in message news:MPG.171e6f04a621015e9896db_at_news.easynews.com...
>
> There are two issue that come to mind that I guess one would need
> to think through:
>
> 1) The first issue would become one of "knitting" back together
> the two trees properly for a pedigree drawing. First, you'd need another
> table for husband-wife pairs. I would assume the knitting would have to
> be done in code? Then, you'd need to resolve

That depends on what you mean exactly with "knitting". It is quite possible to query for the ternary table FMC(father, mother, child) that contains a row for every child that indicates its father and mother.

> 2) What about 'sibling-of' problems? For example, part of the
> nested set for mother A would go to father A, and the rest to father B.
> Do you envisage this to be something else that application code would
> need to resolve?

No. But I'm a bit time-pressed at the moment, so I cannot give you the exact SQL right now. Howevery, if you look in Celko's explanation you can see how to query for the table FC(Father, child) and MC(Mother, Child). Once you have these (as a view, for example) you can easily define FMC.

  • Jan Hidders
Received on Fri Apr 12 2002 - 09:47:34 CEST

Original text of this message