SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to store hierarchical content

    Hi there,

    For quite some time I've pondered how to store hierarchical content in a mySQL database that allowed for dynamic creation of categories and pages. For example, one of my clients wants the ability to add new categories and pages to their Web site via the Content Management System. They want the ability to add and remove as many pages and sections as they want. I did see an article written by a Sitepoint contributor (http://www.sitepoint.com/article/hie...data-database/) that explains how to do this, but it didn't really make sense to me. The obvious approach seems that I would use XML to easily do this. Any suggestions, thoughts, ideas or examples would be greatly appreciated.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    i prefer the simple adjacency model, which is described in the first part of that article, because the other methods are far too complex for me

    here's more information: Categories and Subcategories

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    i prefer the simple adjacency model, which is described in the first part of that article, because the other methods are far too complex for me

    here's more information: Categories and Subcategories

    r937, thanks for your response. It seems that there are only these few approaches (other than using XML) to achieve what I'm trying to do.


Bookmarks

Posting Permissions

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