| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера