Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2974A6326E8 for ; Thu, 8 Apr 2010 04:05:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 30144-03 for ; Thu, 8 Apr 2010 07:05:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id 0DE3263248E for ; Thu, 8 Apr 2010 04:05:11 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id o38759jI070993 for ; Thu, 8 Apr 2010 10:05:09 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id o386u6Gt070876; Thu, 8 Apr 2010 09:56:06 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-sql@postgresql.org Subject: Re: Table Design for Hierarchical Data Date: Thu, 8 Apr 2010 08:56:06 +0200 User-Agent: KMail/1.9.7 Cc: Yeb Havinga References: <201004071139.42140.achill@matrix.gatewaynet.com> <4BBCEC03.3050100@gmail.com> In-Reply-To: <4BBCEC03.3050100@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201004080956.06446.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.959 tagged_above=-10 required=5 tests=AWL=-0.960, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201004/25 X-Sequence-Number: 33952 =CE=A3=CF=84=CE=B9=CF=82 Wednesday 07 April 2010 23:33:07 =CE=BF/=CE=B7 Yeb= Havinga =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Achilleas Mantzios wrote: > > =CE=A3=CF=84=CE=B9=CF=82 Wednesday 07 April 2010 11:06:44 =CE=BF/=CE=B7= Yeb Havinga =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > > =20 > >> Achilleas Mantzios wrote: > >> =20 > >>> You could also consider the genealogical approach, e.g. > >>> > >>> > >>> The parents of any node to the root, i.e. the path of any node to the= root are depicted as > >>> parents[0] : immediate parent > >>> parents[1] : immediate parent of the above parent > >>> =20 > >>> =20 > >> What I have more than one parent? > >> =20 > > > > Then it is no longer neither a tree, nor a hierarchical structure, but = rather a graph. > > This a totally different problem. > > =20 > My question was actually an attempt to point at the inability of what=20 > you call the 'genealogical approach' database design to store=20 > information of more than one parent. Are you suggesting that we should change our definition of trees ADT, just = because it does not fit the mere detail that humans have two parents? Or are you just suggesting that the "genealogical" term is inaccurate? Take a look here: www.tetilab.com/roberto/pgsql/postgres-trees.pdf >=20 > regards, > Yeb Havinga >=20 >=20 =2D-=20 Achilleas Mantzios