Jump to content


Adjacency List Mode, your opinion

  • Please log in to reply
2 replies to this topic

#1 romio

  • Members
  • PipPip
  • Member
  • 28 posts

Posted 02 March 2006 - 01:16 PM

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.


#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 02 March 2006 - 01:24 PM

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.

#3 romio

  • Members
  • PipPip
  • Member
  • 28 posts

Posted 02 March 2006 - 02:11 PM

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?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users