Re: Postgres, DB design, and object IDs (of any ilk) - Mailing list pgsql-general

From Kenneth Tilton
Subject Re: Postgres, DB design, and object IDs (of any ilk)
Date
Msg-id 4A1596E9.5070208@gmail.com
Whole thread Raw
In response to Re: Postgres, DB design, and object IDs (of any ilk)  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general

Merlin Moncure wrote:
> On Thu, May 21, 2009 at 12:35 PM, Kenneth Tilton <kentilton@gmail.com> wrote:
>> If the primary key of the customer table is cust_short_name and my DB
>> reflects also customer departments, I can link a customer to its departments
>> one of three ways:
>>
>> 1. The department table has a cust_short_name column and makes that the
>> first segment of its primary_key;
>>
>> 3. I give the customer a cust_serial_id column and make it SERIAL and give
>> the dept table a column called cust_serial_id.
>
> This is the very well tread 'natural vs. surrogate key' debate.

Ah, thx for the label, I have been able to google up some pros and cons.


Thx again,

kt


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: running postgresql on a private machine accessing it from public web pages
Next
From: Raymond O'Donnell
Date:
Subject: Re: running postgresql on a private machine accessing it from public web pages