On 24 Feb 2011, at 14:07, Simon Slavin wrote: > > On 24 Feb 2011, at 1:06pm, Josh Marell wrote: > >> I would say that couple should be a 3 column table, with coupleID, >> partner1ID, partner2ID. It looks like right now, you have just coupleID and >> partnerID, that doubles the number of rows you have. > > A more flexible way to lay out genealogy databases is as follows: > > Person: id, name, sex, dob > > Relationship: id1, id2, connection > > So you end up with things like > > 1, 17, grandparent > 1, 2, parent > 1, 3, spouse
Ewww that's nasty; I don't like the duplication of data which is implied by other data, because it is easy to construct an inconsistent situation. Either grandparent relationships are derived from parent relationships (in which case why not make a view to do that) or they are entered separately and there is scope for error. Of course the OP's schema has the same problem in that you can define a couple with three members or a person as their own parent or grandparent, neither of which are possible with current technology. Best Regards, Phil Willoughby -- Managing Director, StrawberryCat Limited StrawberryCat Limited is registered in England and Wales with Company No. 7234809. The registered office address of StrawberryCat Limited is: 107 Morgan Le Fay Drive Eastleigh SO53 4JH _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users