X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F3330D1B2D9 for ; Wed, 21 Jul 2004 07:59:16 -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 56492-10 for ; Wed, 21 Jul 2004 10:58:58 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id D17B6D1B2BD for ; Wed, 21 Jul 2004 07:58:53 -0300 (ADT) Received: from [62.165.4.166] (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i6LAwbf07914; Wed, 21 Jul 2004 12:58:37 +0200 Subject: Re: surrogate key or not? From: Markus Bertheau To: sad Cc: pgsql-sql@postgresql.org In-Reply-To: <200407211144.01001.sad@bankir.ru> References: <1090325769.3241.27.camel@dicaprio.akademie1.de> <004101c46ec2$631ca930$7201a8c0@mst1x5r347kymb> <200407210001.00102.josh@agliodbs.com> <200407211144.01001.sad@bankir.ru> Content-Type: text/plain; charset=UTF-8 Message-Id: <1090407515.3239.4.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Wed, 21 Jul 2004 12:58:35 +0200 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/145 X-Sequence-Number: 18397 =D0=92 =D0=A1=D1=80=D0=B4, 21.07.2004, =D0=B2 09:44, sad =D0=BF=D0=B8=D1=88= =D0=B5=D1=82: > 4) Replication: to identify an object of ANY type (record of any table= =20 > regardless to datamodel), to store lists of deleted or modified objects= =20 > (regardless to datamodel) That sounds like a datamodel on data that belongs to another data model, and 5) applies. > 5) Making a primary key: if there is no real key at all. When there's no key at all, there can't be a surrogate key, as I understand it. In such cases a generated unique number comes in handy, and it's a real primary key and no surrogate key. =D0=A1=D0=BF=D0=B0=D1=81=D0=B8=D0=B1=D0=BE --=20 Markus Bertheau