I don’t know about livestock, but it looks like your Sire_ID is the father and Dame_ID is the mother? No problems. One line for each animal, null sire_ and dame_ID for acquired animals, I do not see any problems.
[ID],[Sire_ID],[Dame_ID]; 0,null,null (male) 1,null,null (female) 2,null,null (female) 3,0,1 (male) 4,0,2 (male) 5,null,null (female) 6,3,5 7,4,5
etc. You are probably populating a TreeView or XmlNodeList in a while loop ...
While (myAnimal.HasChildren) { Animal[] children = GetChildren(Animal.ID) for (int x=0; x<children.length; x++) myAnimal.Children.Add(children[x]); }
In this case, Animal.Children is a collection of animals. Therefore, myAnimal.Children [0] .Father will return myAnimal..Parent [] can be a collection of his two parents, which should work as long as [0] is always one parent (father), and [1] is always different (mother) .
Make the caller ID PK and assign Sire_ID and Dame_ID programmatically, returning the identifiers of your parents. No relationship with foreign keys should be required, although both parent identifiers can refer to IDs if you really want to.