At 08:20 AM 9/18/2008, [EMAIL PROTECTED] wrote:
Message-ID:
<[EMAIL PROTECTED]>
Date: Wed, 17 Sep 2008 09:20:44 -0700
From: "Richard Broersma" <[EMAIL PROTECTED]>
To: "Scott Marlowe" <[EMAIL PROTECTED]>
Subject: Re: surrogate vs natural primary keys
In-Reply-To:
<[EMAIL PROTECTED]>
References:
To: pgsql-sql@postgresql.org
From: Seb <[EMAIL PROTECTED]>
Subject: Re: surrogate vs natural primary keys
Date: Mon, 15 Sep 2008 17:56:31 -0500
Organization: Church of Emacs
Lines: 20
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
X-Archive-Numbe
On Wed, Sep 17, 2008 at 7:45 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote:
>> CREATE TABLE t2 (
>>d1 varchar(200),
>>d2 int8,
>>d3 varchar(1000),
>>PRIMARY KEY (d1, d2)
>>FOREIGN KEY (d1, d2) REFERENCES t1(c1, c2) );
>>
>> thereby avoiding repeating multiple pieces of
>> informa
On Wed, Sep 17, 2008 at 7:20 AM, Seb <[EMAIL PROTECTED]> wrote:
> On Tue, 16 Sep 2008 20:34:51 -0600,
> "Scott Marlowe" <[EMAIL PROTECTED]> wrote:
>
> [...]
>
>> create table t2 (
>> d1 varchar(200),
>> d2 int8,
>> d3 varchar(1000),
>> foreign key t2_fk references t1(c1,c2) );
>
> T
On Tue, 16 Sep 2008 20:34:51 -0600,
"Scott Marlowe" <[EMAIL PROTECTED]> wrote:
[...]
> create table t2 (
> d1 varchar(200),
> d2 int8,
> d3 varchar(1000),
> foreign key t2_fk references t1(c1,c2) );
Thanks Scott, I guess you meant:
CREATE TABLE t2 (
d1 varchar(200),
d2 i
On Tue, Sep 16, 2008 at 6:10 PM, Seb <[EMAIL PROTECTED]> wrote:
> Hi,
>
> After some more reading and considering your feedback, I'm still
> somewhat confused about this issue.
>
> 1. Should the choice of surrogate/natural primary keys be done across an
> entire database, or does it make more sense
Hi,
After some more reading and considering your feedback, I'm still
somewhat confused about this issue.
1. Should the choice of surrogate/natural primary keys be done across an
entire database, or does it make more sense to do it on a per-table
basis? I reckon one could do it on a per-table bas
On Tue, Sep 16, 2008 at 07:59:20AM -0700, Richard Broersma wrote:
> key. From my reading of some of the Celko books, he strongly ascribes
> to codes as primary keys. His suggestion is to use internationally
> recognized codes (if they exist) for identify items.
The problem with that strategy is
On Mon, Sep 15, 2008 at 3:45 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote:
> for
> instance, when you book a flight with an airline, you'll get a locator
> code like A89JK3 that is unique to any other locator code in the
> system. Sure, you could make a natural key of first name, last name,
> addre
On Mon, 15 Sep 2008 16:45:08 -0600,
"Scott Marlowe" <[EMAIL PROTECTED]> wrote:
[...]
> I think this question is a lot like "how large should I set
> shared_buffers?" There's lots of different answers based on how you
> are using your data.
Yes, this is precisely what I'm after: *criteria* to he
On Mon, Sep 15, 2008 at 4:02 PM, Seb <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been reading several articles on this hotly debated issue and still
> can't find proper criteria to select one or the other approach for the
> database I'm currently designing. I'd appreciate any pointers. Thanks.
You
Hi,
I've been reading several articles on this hotly debated issue and still
can't find proper criteria to select one or the other approach for the
database I'm currently designing. I'd appreciate any pointers. Thanks.
Cheers,
--
Seb
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresq
12 matches
Mail list logo