Re: Primary Key

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Primary Key
Дата
Msg-id 20071116185422.GY1955@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Primary Key  (João Paulo Zavanela <joao_zava@globo.com>)
Ответы Re: Primary Key
Re: Primary Key
Список pgsql-general
On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote:
> How many fields is recomended to create a primary key?
> I'm thinking to create one with 6 fields, is much?

Normally a primary key would just be a single column.  When you start
going to that many I'd probably have a serial column as the primary key,
and a UNIQUE index on those six fields.  Depends on what you're doing,
though unless you've got a few years experience I'd be tempted to stay
away from primary keys of more than a single column.


  Sam

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

Предыдущее
От: João Paulo Zavanela
Дата:
Сообщение: Primary Key
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Primary Key