Re: Postgres, DB design, and object IDs (of any ilk)

Поиск
Список
Период
Сортировка
От Kenneth Tilton
Тема Re: Postgres, DB design, and object IDs (of any ilk)
Дата
Msg-id 4A1596E9.5070208@gmail.com
обсуждение исходный текст
Ответ на Re: Postgres, DB design, and object IDs (of any ilk)  (Merlin Moncure <mmoncure@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: running postgresql on a private machine accessing it from public web pages
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: running postgresql on a private machine accessing it from public web pages