To build a consistent oriented tree we need to associate to the nodes a 
ranking property such as the birthdate (or any precedence criterion).
Therefore the ancestor of  someone  is to be selected among  older ones.
To make the ancestor allocation more easy  the ancestor's list may be 
filtered on birthdate credibility.
The ranking property eliminates the circular link concern.


Jan a écrit :
> Hi Mark,
>
> I think that wont work:
>
> Scenario: A calf is born from a mother within your flock but from a 
> father outside. The father appears for the first time and you are not 
> able to gather information on his father (or grand-grand father). 
> Therefore his father is NULL. But later you get the information on his 
> father and add it to the animal list: The id of the fathers father is 
> then greater then the id of his grandchild (the calf).
> I could start the id initially with 100000 to allocate <100000 ids in 
> theses cases, but I am unsure if this is a good way to start.
>
> Mark Hamburg schrieb:
>   
>> One of the questions that I believe was raised but not answered on  
>> this thread was how to make sure that you don't have circular  
>> relationships particularly given that SQLite isn't good at scanning  
>> the tree. If you can control the id's then simply require that the id  
>> of the child be greater than the id's of the parents.
>>
>> Mark
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>     
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>   

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to