I've spent a few days working on a directory type script and come across the common problem of how best to store the tree structure in mySQL. I've found plenty of resources that are great at explaining the theory but kinda lacking in the how to add/delete/move nodes examples. I've got as far as being able to modify the structure fairly easily - as in add and delete leaf nodes. Deleting nodes with children, moving nodes, etc. is a bit beyond me. Which brings me to my question - I want to store a category tree structure in a database but which (free) ones can I use? I've tried searching but no luck so far.. Many thanks..
Postgres would be ideal. It's built in refferential integrity makes something like this nice and simple.