Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id EF4C06322CF for ; Mon, 12 Apr 2010 05:14:25 -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 58951-08 for ; Mon, 12 Apr 2010 08:14:11 +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 D2ABA62F118 for ; Mon, 12 Apr 2010 05:14:13 -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 o3C8EBOL040801 for ; Mon, 12 Apr 2010 11:14:11 +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 o3C8EAxj040800 for pgsql-sql@postgresql.org; Mon, 12 Apr 2010 11:14:10 +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: Mon, 12 Apr 2010 10:14:09 +0200 User-Agent: KMail/1.9.7 References: <201004080956.06446.achill@matrix.gatewaynet.com> <4BBDEF35.6040308@gmail.com> In-Reply-To: <4BBDEF35.6040308@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201004121114.10189.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.922 tagged_above=-10 required=5 tests=AWL=-0.922 X-Spam-Level: X-Archive-Number: 201004/41 X-Sequence-Number: 33968 =CE=A3=CF=84=CE=B9=CF=82 Thursday 08 April 2010 17:59:01 =CE=BF/=CE=B7 Rob = Sargent =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > The "parent" node in a genealogy is the mother-father tuple, so given > that as a singularity it still fits a tree. No, because the child and parent node would be of different schema. >=20 > On 04/08/2010 12:56 AM, Achilleas Mantzios wrote: > > =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 t= he 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, bu= t 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. > >=20 > >=20 > > Are you suggesting that we should change our definition of trees ADT, j= ust because it does not > > fit the mere detail that humans have two parents? > > Or are you just suggesting that the "genealogical" term is inaccurate? > >=20 > > Take a look here: www.tetilab.com/roberto/pgsql/postgres-trees.pdf > >=20 > >> > >> regards, > >> Yeb Havinga > >> > >> > >=20 > >=20 > >=20 >=20 =2D-=20 Achilleas Mantzios