I am writing some scripts for a new site at the moment where there is a lot of hierarchical data that needs to be represented (basically loads of parent child relationships). Im using a php/mysql setup.
I did this on a previous website using the "adjacency model" where you have a database table such as:
empID ¦ name ¦ managerID
1 bob 0
2 bill 1
3 ben 1
This worked pretty well but wasnt so good when you consider a situation where a child can have many parents - you run into normalization problems. So I have been looking around for other solutions. I came across the "nested sets" technique which is based on mathematical graph theory, it sounds like it could do the trick but I was wondering if anyone had used it and had any thoughts, and particularly if it has been used in situations where a child can have many parents.
Cheers