Jump to content


This topic is now archived and is closed to further replies.


Adjacency List Mode, your opinion

Recommended Posts

Am not sure how to ask this, am suppose to create my database as the following, user access admin panel, then can

Add, Delete, Edit Categories, also the user can create subcategories of the root category, also add product for each category, i am not really familiar with trees in sql, all my previous work was straight forward, no trees, I did read Joe Celko's Trees and hierarchies in SQL for smarties for Adjacency List Mode but i didn’t really understand how can i build my database, can anyone help out.


Share this post

Link to post
Share on other sites
You might want to have a read of [a href=\"http://www.phpriot.com/d/articles/php/application-design/nested-trees-1/index.html\" target=\"_blank\"]this[/a] article on implimenting nested sets in php. Depending on exactly how your using your trees, nested sets can be more efficient than the adjacency model.

Share this post

Link to post
Share on other sites

The article was very helpfull, ok so lets say that i want to build this two tables

Categories and prodcut and

Categories consist of

product consist of:

So will I have to create two tables or one table?

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.