Re: Relational/hierarchical data problem

From: Bernard Peek <bap_at_shrdlu.com>
Date: Tue, 18 Feb 2003 15:56:20 +0000
Message-ID: <uobanqMkelU+Ew3r_at_shrdlu.co.uk>


In message <8792b468.0302180552.7816cbe3_at_posting.google.com>, Will <mrbrown_1998_at_yahoo.com> writes
>I'm working with data similar to that found in a family tree. In this
>case it applies to animals and particularly breeding. The data is held
>within a single table in a relational database and takes the form of a
>single record for each animal, which includes two fields to reference
>the unique ID of both the mother and the father.
>
>I need to determine how many shared ancestors exist between the
>subject and any other animal and which ancestors are shared.

Sorry if I'm teaching my grandmother to suck eggs, but is that really what you need? I'm guessing that you need to determine the degree of consanguinity. That would imply that you need to take note of the number of generations that separate the ancestors and the current generation and apply a power-law. If you only need to know the degree of consanguinity it might be possible to generate an answer without recursive searches.

Finding answers to difficult questions like this is critically dependent on a clear and precise understanding of what is required. It's important to avoid devising complex solutions that deliver more information than is actually needed.

-- 
Bernard Peek
bap_at_shrdlu.com
www.diversebooks.com: SF & Computing book reviews and more.....

In search of cognoscenti
Received on Tue Feb 18 2003 - 16:56:20 CET

Original text of this message