Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Product Categories

    Hi all,

    I am currently a bit stuck and would like some help. I am designing a product catalogue and need help with multiple categories. The way i have it like this.


    PRODUCT TABLE
    ProdID
    ProdName
    ProCat
    etc....

    CATEGORY TABLE
    CatID
    CatLevel --> Level Of Category i.e. 0 for top level, 1 for next etc
    CatParent --> Category Parent - cat above this cat i.e. if i had a computer mouse and its category was Accesories then the parent of that would be computer equipment, and the parent of that may be all products. its so i can build like a breadcrumb of navigation such as!

    All >> Computer Equipment >> Accesories

    Is this concept ok, or am i missing something?

    Please Help,

    Rob


    I am assuming that i can use this method to do this. if a product is assi

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    category hierarchy concept is fine

    the "level" column might be tricky to maintain, but it can also be useful

    do a search for "adjacency model" (which is what this is)

    for another type of structure, search for "celko nested set"
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2003
    Posts
    3
    Thanks R937 that was a great help did some research and there it was thanks again.

    Rob (y)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •