Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBSFbxL13281 for ; Thu, 28 Dec 2000 10:37:59 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id KAA82437 for pgsql-sql@postgresql.org; Thu, 28 Dec 2000 10:12:56 -0500 (EST) (envelope-from news) X-Authentication-Warning: news.tht.net: news set sender to using -f From: Ron Peterson X-Newsgroups: comp.databases.postgresql.sql Subject: Re: How to represent a tree-structure in a relational database Date: Thu, 28 Dec 2000 10:12:56 -0500 Organization: Yellowbank Lines: 11 Message-ID: <3A4B5878.1F30271A@yellowbank.com> References: <3A4B4D8C.9E542934@yellowbank.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.tht.net 978016376 82434 138.110.30.68 (28 Dec 2000 15:12:56 GMT) X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.4.0-test9 i686) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200012/277 X-Sequence-Number: 614 Ron Peterson wrote: > > This structure is more 'normal' in the sense that nodes without children > (in a tree, the leaf nodes) don't have records in the edge table. Phghpth. Should have had my coffee first. The first data structure given would only have a null parent id for the root node, not all the leaf nodes. My mistake. Thought it might be politic to point that out before someone (correctly) called me an idiot. -Ron-