Re: question on serial key

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: question on serial key
Дата
Msg-id 20090522143334.GC5407@samason.me.uk
обсуждение исходный текст
Ответ на question on serial key  (Brandon Metcalf <brandon@geronimoalloys.com>)
Ответы Re: question on serial key  (Brandon Metcalf <brandon@geronimoalloys.com>)
Re: question on serial key  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Список pgsql-general
On Fri, May 22, 2009 at 08:41:46AM -0500, Brandon Metcalf wrote:
> I am looking for criteria on deciding whether or not to use a serial
> (auto-incrementing) key for rows in a table.

Wow, that's the second time today someone asked that!

> Intuitively, it's pretty clear to me when a serial index is called
> for.  Is there a succinct set of guidelines that one could go by?

Not that I'm aware of; it's a fuzzy design choice with benefits and
costs for either option.  There are lots of people who arbitrarily
pick one side which tends to make things worse, using one or the other
*exclusively* will add complication.  General terms to search for are
Natural keys vs. Surrogate keys.

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: question on serial key
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: question on serial key