From filipe@brasilenergia.com.br Thu Jul 21 15:37:58 2005 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7D8C652A38 for ; Thu, 21 Jul 2005 12:37:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92246-02 for ; Thu, 21 Jul 2005 15:37:49 +0000 (GMT) Received: from gw.brasilenergia.com.br (mvx-200-201-180-154.mundivox.com [200.201.180.154]) by svr1.postgresql.org (Postfix) with ESMTP id 708B5529E2 for ; Thu, 21 Jul 2005 12:37:47 -0300 (ADT) Received: (qmail 10114 invoked by uid 89); 21 Jul 2005 12:36:42 -0300 X-Scanned-By: AMaViS at Editora Brasil Energia Ltda managed site. Received: from unknown (HELO filipe) (192.168.0.19) by gw.brasilenergia.com.br with SMTP; 21 Jul 2005 12:36:42 -0300 Message-ID: <010901c58e0a$37e50420$1300a8c0@brasilenergia> From: "Filipe Knoedt" To: "PG LIST" Subject: N-to-N implementation Date: Thu, 21 Jul 2005 12:38:18 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0106_01C58DF1.12763A60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.146 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_50_60, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200507/178 X-Sequence-Number: 18234 This is a multi-part message in MIME format. ------=_NextPart_000_0106_01C58DF1.12763A60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I'd like to set up a discussion (if necessary) about two different ways = to implement N-to-N relationships: using a N-to-N intermediary table or, = suppose an A and B tables situation, creating the primary key of the = table B with the A.id plus a sequencer. I'm thinking on going the second way, but decided to ask the list if = anybody sees any potencial problem in it, like for performance or = anything. Filipe Knoedt ------=_NextPart_000_0106_01C58DF1.12763A60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
 
I'd like to set up a = discussion (if=20 necessary) about two different ways to implement N-to-N=20 relationships: using a N-to-N intermediary table or, suppose = an A=20 and B tables situation, creating the primary key of the table = B with=20 the A.id plus a sequencer.
 
I'm thinking on going the second way, = but decided=20 to ask the list if anybody sees any potencial problem in it, like for=20 performance or anything.
 
Filipe = Knoedt
------=_NextPart_000_0106_01C58DF1.12763A60-- From oleg@sai.msu.su Thu Jul 21 16:02:54 2005 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9364052997 for ; Thu, 21 Jul 2005 13:02:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93123-09 for ; Thu, 21 Jul 2005 16:02:44 +0000 (GMT) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id A38F052815 for ; Thu, 21 Jul 2005 13:02:30 -0300 (ADT) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.13.4/8.13.4) with ESMTP id j6LG2AuH011308; Thu, 21 Jul 2005 20:02:10 +0400 (MSD) Date: Thu, 21 Jul 2005 20:02:10 +0400 (MSD) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Filipe Knoedt Cc: PG LIST Subject: Re: N-to-N implementation In-Reply-To: <010901c58e0a$37e50420$1300a8c0@brasilenergia> Message-ID: References: <010901c58e0a$37e50420$1300a8c0@brasilenergia> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.327 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200507/179 X-Sequence-Number: 18235 On Thu, 21 Jul 2005, Filipe Knoedt wrote: > Hi all, > > I'd like to set up a discussion (if necessary) about two different ways to implement N-to-N relationships: using a N-to-N intermediary table or, suppose an A and B tables situation, creating the primary key of the table B with the A.id plus a sequencer. > > I'm thinking on going the second way, but decided to ask the list if anybody sees any potencial problem in it, like for performance or anything. we use contrib/intarray to avoid joining > > Filipe Knoedt Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83