Jump to content

Adjacency List Mode, your opinion


romio

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.


Thanks.

Link to comment
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.
Link to comment
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
Cat_name

product consist of:
Pro_DI,
Name,
Description.

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.