pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: miguel sofer <mig@utdt.edu>
To: Frank Joerdens <frank@joerdens.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to represent a tree-structure in a relational database
Date: Wed, 13 Dec 2000 19:44:02 GMT
Message-ID: <20001213.19440200@ant.utdt> (raw)
In-Reply-To: <3A379A5F.97FFAF01@joerdens.de>
References: <3A379A5F.97FFAF01@joerdens.de>

I once started writing a small paper on this subject; it is still in a 
rather preliminary state.

You can download the draft (and some ill documented code, 53kB) from 
  http://www.utdt.edu/~mig/sql-trees

Miguel

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 12/13/00, 12:48:47 PM, Frank Joerdens <frank@joerdens.de> wrote 
regarding [SQL] How to represent a tree-structure in a relational database:


> I am just thinking about the data model for a little content management 
system that I am
> currently planning. Individual articles are sorted under different 
categories which branch
> into subcategories, sub-subcategories etc. up to a depth of about 6 or 7 
levels. The
> structure should be extensible, i.e. it must be possible to add levels. 
What I am thinking
> now is that you would keep the index in a separate index table (linked 
with the primary
> key in the articles table), which would have 6 or 7 fields initially, and 
that you'd add
> columns with the alter table command, if need be, to make the structure 
deeper. Is this
> the recommended way to go about it? It feels pretty 'right' to me now but 
since the
> problem should be fairly common, there must be other people who have 
thought and written
> about it and there might even be a recognized 'optimal' solution to the 
problem.

> Comments?

> - Frank



view thread (27+ messages)  latest in thread

Message-ID: <20001213.19440200@ant.utdt>
Permalink:  ../20001213.19440200@ant.utdt/
Also on:    postgresql.org/message-id/20001213.19440200@ant.utdt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mig@utdt.edu, frank@joerdens.de
  Subject: Re: How to represent a tree-structure in a relational database
  In-Reply-To: <20001213.19440200@ant.utdt>
  References: <3A379A5F.97FFAF01@joerdens.de> <20001213.19440200@ant.utdt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox