PHP implementations of algorithms for storing heirarchical data in a relational DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Saunders

    PHP implementations of algorithms for storing heirarchical data in a relational DB

    There's lots of ways of representing a hierarchical data structure in a
    relational database. These range from the trivially easy to implement in
    PHP (adjacency list; each node has an ID and a ParentID) to the fairly
    nightmarish (Tropashko's nested intervals).

    In starting this thread I'm not looking for a primer on any of these
    methods, which Google will happily provide; I'm looking to create a list of
    PHP implementations of any such method - and in particular I'm hoping that
    someone's tackled Tropashko's stuff in PHP already so that I don't have to
    reinvent the wheel ;-)

    So please post if you've developed, or know of, any PHP implementation for
    handling this kind of data, maybe using the methods I've mentioned, some
    Celko-inspired method, or maybe something totally different.

    Maybe someone else is already working on Tropashko's newest article, posted
    on comp.databases. theory only yesterday, http://arxiv.org/html/cs.DB/0401014
    ?

    Cheers

    Matt Saunders.


  • Manuel Lemos

    #2
    Re: PHP implementations of algorithms for storing heirarchical datain a relational DB

    Hello,

    On 01/21/2004 07:53 AM, Matt Saunders wrote:[color=blue]
    > There's lots of ways of representing a hierarchical data structure in a
    > relational database. These range from the trivially easy to implement in
    > PHP (adjacency list; each node has an ID and a ParentID) to the fairly
    > nightmarish (Tropashko's nested intervals).
    >
    > In starting this thread I'm not looking for a primer on any of these
    > methods, which Google will happily provide; I'm looking to create a list of
    > PHP implementations of any such method - and in particular I'm hoping that
    > someone's tackled Tropashko's stuff in PHP already so that I don't have to
    > reinvent the wheel ;-)
    >
    > So please post if you've developed, or know of, any PHP implementation for
    > handling this kind of data, maybe using the methods I've mentioned, some
    > Celko-inspired method, or maybe something totally different.
    >
    > Maybe someone else is already working on Tropashko's newest article, posted
    > on comp.databases. theory only yesterday, http://arxiv.org/html/cs.DB/0401014
    > ?[/color]


    You may want to learn Joe Celko's approach to solve that problem
    efficiently with SQL databases. His approach is described in this book:

    Title: SQL for Smarties: Advanced SQL Programming
    SQL for Smarties: Advanced SQL Programming (Database programming books, Morgan-Kaufmann)



    You may want to take a look also at these PHP implementations of trees
    in databases:

    Class: Joe Celko Nested Sets


    Class: myXTree


    Class: php_tree



    --

    Regards,
    Manuel Lemos

    Free ready to use OOP components written in PHP
    Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


    Comment

    • Jochen Buennagel

      #3
      Re: PHP implementations of algorithms for storing heirarchical datain a relational DB

      Manuel Lemos wrote:[color=blue]
      > You may want to learn Joe Celko's approach to solve that problem
      > efficiently with SQL databases. His approach is described in this book:[/color]

      The OP specifically mentioned Celko in his post, so I think he was aware
      of his approach and his book.

      Jochen

      Comment

      • Matt Saunders

        #4
        Re: PHP implementations of algorithms for storing heirarchical data in a relational DB

        "Jochen Buennagel" <zang.NOSPAM@bu ennagel.com> wrote in message
        news:buo4d0$p1h $05$3@news.t-online.com...[color=blue]
        > Manuel Lemos wrote:[color=green]
        > > You may want to learn Joe Celko's approach to solve that problem
        > > efficiently with SQL databases. His approach is described in this book:[/color]
        >
        > The OP specifically mentioned Celko in his post, so I think he was aware
        > of his approach and his book.
        >
        > Jochen[/color]

        Correct, I was aware of Celko's approach, but (for a comprehensive review of
        the topic I'm writing) I wanted to pick people's brains here for their
        knowledge of any specificly PHP implementations of it or similar
        algorithms - which is exactly what Manuel supplied, so thanks very much.
        Anyone else have any?

        Cheers

        Matt S.


        Comment

        Working...