"David Portas" <REMOVE_BEFORE_REPLYING_dportas@acm.org> wrote in message
news:KoidnWIIr-MC8iGi4p2dnA@giganews.com...
> The adjacency list model of a hierarchy typically uses a single table like
> this:
>
> CREATE TABLE Sometable (pageid INTEGER PRIMARY KEY, parent_pageid INTEGER
> NULL REFERENCES Sometable (pageid))
>
> Entities at the root of the tree have NULL in the parent column.
>
> You should be aware that things become difficult in an adjacency list if
the
> tree is of undefined depth. There isn't a set-based solution for
extracting
> a sub-tree from a given parent node, which is a common requirement. You
can
> traverse the subtree iteratively or you can consider alternative models
such
> as Nested Sets:
>
>
http://www.intelligententerprise.com/001020/celko1_1.shtml >
> --
> David Portas
> ------------
> Please reply only to the newsgroup
> --
>
>