>In a simple tree, one can easily see that using the title of a node as
>it's primary key is not smart... names can easily collide:
The names can definitely collide. But under a file system paradigm
the combination of name with parentID will be unique and define the
tree structure you mention:
create table nodes (
nodeID integer NOT NULL PRIMARY KEY,
parentID integer NOT NULL,
name char(50),
INDEX p_id_idx (parentID)
);
example to list a directory from this:
SELECT names FROM nodes WHERE parentID = 1234;
Brad Eacker ([EMAIL PROTECTED])
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]