Re: How to represent a tree-structure in a relational database

Поиск
Список
Период
Сортировка
От Ron Peterson
Тема Re: How to represent a tree-structure in a relational database
Дата
Msg-id 3A4B520C.98F98689@yellowbank.com
обсуждение исходный текст
Ответ на RE: How to represent a tree-structure in a relational database  ("Stuart Statman" <stu@slammedia.com>)
Список pgsql-sql
Ron Peterson wrote:
> 
> CREATE TABLE category_edge (
>         parent  INTEGER
>                 NOT NULL
>                 REFERENCES category_node(id),
> 
>         child   INTEGER
>                 NOT NULL
>                 REFERENCES category_node(id)
> );

Just for the sake of anal-retentive completeness, I'd like to point out
that you'd probably want an id field in this table also.  Plus what the
heck else am I going to do on Christmas break?  ;)

On a completely unrelated topic: getting the PostgreSQL discussions
lists on a news server is great!!!  I was overwhelmed with mail that I
usually don't have time to deal with.  Now when I have a chance, I just
go see what's up on the news server.  Excellent and thanks!

-Ron-


В списке pgsql-sql по дате отправления:

Предыдущее
От: Ron Peterson
Дата:
Сообщение: Re: Tree structure table normalization problem (do I need a trigger?)
Следующее
От: Ron Peterson
Дата:
Сообщение: Re: How to represent a tree-structure in a relational database