On 24 Feb 2011, at 13:40, Igor Tandetnik wrote: > Josh Marell <macman...@gmail.com> 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. > > On the other hand, this would make many queries more complicated. Try > generating a list of all grandparents in this model. > > Also, those ORs you will have to use tend to prevent SQLite from using > indexes.
And, practically, it would limit the usefulness of the database: you would need to know both parents of a person to fill in that table, or permit NULL entries. You also run a greater risk of duplication-related problems, for instance: 1,1,2 2,2,1 Are logically the same couple but now have two couple IDs. 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