473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
Jul 17 '05 #1
3 3073
Hello,

On 01/21/2004 07:53 AM, Matt Saunders wrote:
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
?

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
http://www.phpclasses.org/products.h...558605762.html
You may want to take a look also at these PHP implementations of trees
in databases:

Class: Joe Celko Nested Sets
http://www.phpclasses.org/celkonestedset

Class: myXTree
http://www.phpclasses.org/myxtree

Class: php_tree
http://www.phpclasses.org/raro_php_tree
--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Jul 17 '05 #2
Manuel Lemos wrote:
You may want to learn Joe Celko's approach to solve that problem
efficiently with SQL databases. His approach is described in this book:


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

Jochen
Jul 17 '05 #3
"Jochen Buennagel" <za*********@buennagel.com> wrote in message
news:bu*************@news.t-online.com...
Manuel Lemos wrote:
You may want to learn Joe Celko's approach to solve that problem
efficiently with SQL databases. His approach is described in this book:


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

Jochen


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.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rolf Hemmerling | last post by:
Hello ! Beginner's question: What ist the easiest way to store and save objects in a file generated by a C++ program, by using the "standard C++ library" and/or "Standard Template Library (...
2
by: Tom | last post by:
Hi, I'm designing a website where all the articles/news will be stored in XML. (I will use PHP to parse the XML.) Should I store the XML in separate .xml files or should I store the XML in a...
1
by: Dr Ann Huxtable | last post by:
Hello, I am trying to design an abstract data type (lets call it an HTable) which mimics a heirarchical rcordset (ala ADO 2.0). I have got this far: 1). Data will be stored in a vector of...
3
by: Ann Huxtable | last post by:
Hi, I am writing a nested table structure to mimic data returned from a database (actually, a heirarchical recordset). I am representing the cells where the actual data is stored, by a union:...
6
by: cleveralex1212 | last post by:
Sorry to disturb. I'm truly a beginner in C++ and my knowledge of it is really not much. I've been facing a serious problem during these few days. Let me describe my situation as clearly as I can...
1
by: Lucas Fletcher | last post by:
Hi All, I've searched the web for an article explaining the many tradeoffs between storing your XML in a database vs the filesystem but I haven't really found anything of note. This is the...
6
by: Mudcat | last post by:
Hi, I am trying to build a tool that analyzes stock data. Therefore I am going to download and store quite a vast amount of it. Just for a general number - assuming there are about 7000 listed...
3
by: redefined.horizons | last post by:
I'm just beginning to learn C programming, after working for a while with high-level languages. I am wondering if there is a standard set of implementations for things like hash maps and linked...
10
by: nayden | last post by:
I started playing with python a few weeks ago after a number of years of perl programming and I can say that my first impression is, unsurprisingly, quite positive. ;) The reason I am writing here...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.