Hello all,

I am putting multiple "address book" (trees) into a MySQL database. These "address book" are made of "directories" and "persons".

It gives something like that for the tables :
Directory
--------------
ID
Name
ID_father (the reference to the father directory)



Person ------------- ID Name ID_father (the reference to the father directory)


Creating the tree doesn't give me problem. Where I ask me some questions, is the speed to get the whole tree from the database in a recursive way.
The way the tree is defined in the database, I will be obliged to make for each node a SELECT to know all its children, then do the same for the children, etc... Each SELECT will give me a ResultSet. And from each ResultSet I will know if the node has got childrens, and if yes, I'll have to make new requests to the database (one for each child), etc...


As I will have a lot of clients that will ask for those trees, I am wondering if this technique won't take too much ressources and be too slow.

I know that Oracle uses CONNECT BY PRIOR for this type of problem. But, as this functionnality isn't available yet in MySQL, I'm asking you for the best solution you would think of.

Thank you very much for your help.

PS : Any website talking about database conception would be very helpfull to me if you know some.


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to