[thelist] Genealogy database schema
Mike Migurski
mike at saturn5.com
Thu Jan 2 16:52:01 CST 2003
>> one could add a 'union' table, and replace the 'mother' and 'father'
>> columns in the people table with 'parents'.
>
>yeah, but
>
>show me the sql to list both mother and father on the same line with the
>person
in mysql, i'd do the following:
select
person.id, union.member1 as father, union.member2 as mother
from
union, person
where
person.id=foo
and person.parents=union.id
problems: query assumes male/female unions, and doesn't differentiate
between different kinds of unions. union table would likely require start
and end dates, as well as a type column: 'marriage', 'tryst', etc. :)
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
http://www.saturn5.com/mike/contact.html
"Freedom! Horrible, horrible freedom!"
More information about the thelist
mailing list