Re: Figuring out relationships between tables.

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Andrew Cooper <kairoscreative(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Figuring out relationships between tables.
Date: 2009-08-23 17:42:48
Message-ID: 069F84CC-482D-47E3-B19C-642DAA797ABE@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 23, 2009, at 7:47 AM, Andrew Cooper wrote:
> An employee can only have 1 manager/supervisor but the hierarchy can
> be varying depths.

Traditionally, that's done by having a "supervisor" field as part of
the employee record, with either NULL or a special marker value to
indicate "no supervisor." The new WITH RECURSIVE functionality of 8.4
makes dealing with tree structures like this much easier.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2009-08-23 17:49:34 Re: Multiple table entries?
Previous Message Greg Stark 2009-08-23 17:23:23 Re: Multiple table entries?