php-db | 2002122
Date: 12/19/02
- Next message: Gary.Every <email protected>: "RE: [PHP-DB] More linking problems but slightly OT"
- Previous message: George Pitcher: "[PHP-DB] More linking problems but slightly OT"
- In reply to: 1LT John W. Holmes: "Re: [PHP-DB] trees in MySQL"
- Next in thread: José Moreira: "RE: [PHP-DB] trees in MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The difficulty you are being confronting could be alleviated by using an XML data model (meaning non relational). Of course, I don't know about your requirements, but it could be a direction worth investigating.
I use the php_xslt.dll (sablotron) extension, which I find works quite pleasantly.
Ignatius
____________________________________________
----- Original Message -----
From: "José Moreira" <jmoreira <email protected>>
To: "Php-Db (Correio electrónico)" <php-db <email protected>>
Sent: Thursday, December 19, 2002 11:45 AM
Subject: [PHP-DB] trees in MySQL
> hello im implementing a portal and im choosing between the 'Nested Set'
and
> 'Adjacency Lists tree' models.
> <http://users.starpower.net/rjhalljr/Serve/MySQL/traer.html>
>
>
> im perfectly aware of the 'Adjacency Lists tree' model how-to and I am
> studying the 'Nested Set', example follows :
>
> CREATE TABLE LanguageTree (
>
> Language VARCHAR(255) PRIMARY KEY
> , Parent VARCHAR(255)
> , Lft LONG
> , Rgt LONG
> , INDEX idxLft (Lft)
> , INDEX idxRgt (Rgt)
> ) Comment = "Related languages";
>
>
> A[1 12]
> / \
> / \
> B[2 3] C[4 11]
> / \
> / \
> D[5 8] F[9 10]
> |
> E[6 7]
>
>
> my doubt is that if i want to insert a new node, for example 'G' under 'A'
>
> A[1 12]
> / | \
> / \
> B[2 3] G[] C[4 11]
> / \
> / \
> D[5 8] F[9 10]
> |
> E[6 7]
>
>
> i have? to update almost every left,righ fields after that node, resulting
> in a website performance downgrade ....
>
>
> help? even if thjats the only way, how can i do it? perhaps im getting it
> wrong ...
>
>
> best regards
>
>
> José Moreira
> TEGOPI S.A.
> http://www.tegopi.pt
>
>
>
>
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Gary.Every <email protected>: "RE: [PHP-DB] More linking problems but slightly OT"
- Previous message: George Pitcher: "[PHP-DB] More linking problems but slightly OT"
- In reply to: 1LT John W. Holmes: "Re: [PHP-DB] trees in MySQL"
- Next in thread: José Moreira: "RE: [PHP-DB] trees in MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

