The data is of dogs but i think many of the same functions apply as for a familytree of people. I have at table of data looking like this : Tags: Name ;Reg;Reg_Father;Father;Reg_mother ;Mother ;Born;Count Values: Prince;NO34567;NO12345;King;NO23456 ;Queen;2016-12-30;5 The primary key is the value "Reg" and this relates to "Reg_father" and "Reg_mother" this are all known values. "Name" is related to "Reg" in the same way "Reg_father" is to "Father" and "Reg_mother" is to "Mother" What i like to do is 1. to be able to make a "familytree" and to list commen ancestors 2. how many times these ancestors appear in the lines. Name or Reg with a count behind. any idees of best way to achieve this goal? BR Jimmy
I'd probably add an id field to the table and let the kennel club number be information rather than the primary key. Creating the family tree is a well document process - look for tutorials on parent_id and traversing the tree. counting how many times an ancestor appears would be a run time query and not something you save on the database.