| From: | Kenneth Tilton <kentilton(at)gmail(dot)com> |
|---|---|
| To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Postgres, DB design, and object IDs (of any ilk) |
| Date: | 2009-05-21 18:01:13 |
| Message-ID: | 4A1596E9.5070208@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Merlin Moncure wrote:
> On Thu, May 21, 2009 at 12:35 PM, Kenneth Tilton <kentilton(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Raymond O'Donnell | 2009-05-21 18:04:58 | Re: running postgresql on a private machine accessing it from public web pages |
| Previous Message | Joshua D. Drake | 2009-05-21 17:52:48 | Re: running postgresql on a private machine accessing it from public web pages |