Re: Surrogate keys (Was: enums)

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Surrogate keys (Was: enums)
Дата
Msg-id 20060119072717.GA9949@svana.org
обсуждение исходный текст
Ответ на Re: Surrogate keys (Was: enums)  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Surrogate keys (Was: enums)  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Wed, Jan 18, 2006 at 03:58:50PM -0800, Josh Berkus wrote:
> Martjin,
>
> > Interesting. However, in my experience very few things have "natural
> > keys". There are no combination of attributes for people, phone calls
> > or even real events that make useful natural keys.
>
> I certainly hope that I never have to pick up one of your projects.   A
> table without a natural key is a data management disaster.   Without a
> key, it's not data, it's garbage.

???

Please provides natural keys for any of the following:

- A Person
- A phone call: (from,to,date,time,duration) is not enough
- A physical address
- A phone line: (phone numbers arn't unique over time)
- An internet account: (usernames not unique over time either)

In any of these either misspellings, changes of names, ownership or
even structure over time render the obvious useless as keys. There are
techniques for detecting and reducing duplication but the point is that
for any of these duplicates *can* be valid data.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: No heap lookups on index
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Indexes vs. cache flushes