Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 12E10635A8C for ; Mon, 12 Apr 2010 11:54:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96545-01 for ; Mon, 12 Apr 2010 14:54:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mail.postgresql.org (Postfix) with ESMTP id 6DCBF632E95 for ; Mon, 12 Apr 2010 11:54:47 -0300 (ADT) Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1O1L2D-0000XK-7v; Mon, 12 Apr 2010 08:54:45 -0600 Received: from [208.187.158.94] (helo=[172.16.1.233]) by in02.mta.xmission.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1O1L2D-0000kE-3O; Mon, 12 Apr 2010 08:54:45 -0600 Message-ID: <4BC334E2.6020600@gmail.com> Date: Mon, 12 Apr 2010 08:57:38 -0600 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Thunderbird/3.0.3 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Table Design for Hierarchical Data References: <201004080956.06446.achill@matrix.gatewaynet.com> <4BBDEF35.6040308@gmail.com> <201004121114.10189.achill@matrix.gatewaynet.com> In-Reply-To: <201004121114.10189.achill@matrix.gatewaynet.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-XM-SPF: eid=; ; ; mid=; ; ; hst=in02.mta.xmission.com; ; ; ip=208.187.158.94; ; ; frm=robjsargent@gmail.com; ; ; spf=neutral X-SA-Exim-Connect-IP: 208.187.158.94 X-SA-Exim-Rcpt-To: pgsql-sql@postgresql.org, rsargent@amirsys.com X-SA-Exim-Mail-From: robjsargent@gmail.com X-SA-Exim-Scanned: No (on in02.mta.xmission.com); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201004/43 X-Sequence-Number: 33970 Believe me: "ego-ma-pa" will correctly define genealogical relationships (at least among humans). On 04/12/2010 02:14 AM, Achilleas Mantzios wrote: > Στις Thursday 08 April 2010 17:59:01 ο/η Rob Sargent έγραψε: >> 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. >> >> On 04/08/2010 12:56 AM, Achilleas Mantzios wrote: >>> Στις Wednesday 07 April 2010 23:33:07 ο/η Yeb Havinga έγραψε: >>>> Achilleas Mantzios wrote: >>>>> Στις Wednesday 07 April 2010 11:06:44 ο/η Yeb Havinga έγραψε: >>>>> >>>>>> Achilleas Mantzios wrote: >>>>>> >>>>>>> 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 >>>>>>> >>>>>>> >>>>>> What I have more than one parent? >>>>>> >>>>> >>>>> Then it is no longer neither a tree, nor a hierarchical structure, but rather a graph. >>>>> This a totally different problem. >>>>> >>>> My question was actually an attempt to point at the inability of what >>>> you call the 'genealogical approach' database design to store >>>> 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 >>> >>>> >>>> regards, >>>> Yeb Havinga >>>> >>>> >>> >>> >>> >> > > >