Re: Primary Key
От | Joshua D. Drake |
---|---|
Тема | Re: Primary Key |
Дата | |
Msg-id | 20071116110115.040ec1f9@commandprompt.com обсуждение исходный текст |
Ответ на | Re: Primary Key (Sam Mason <sam@samason.me.uk>) |
Список | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 16 Nov 2007 18:54:22 +0000 Sam Mason <sam@samason.me.uk> wrote: > 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. Uhmm no. Normally a primary key is defined by the number of columns it takes to determine naturally distinct values. I would agree that if he is looking at 6 then he probably needs to normalize further. Sincerely, Joshua D. Drake - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 PostgreSQL solutions since 1997 http://www.commandprompt.com/ UNIQUE NOT NULL Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL Replication: http://www.commandprompt.com/products/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHPej7ATb/zqfZUUQRAjnAAJ4p8mH685V/ysBDd4sPLoUkDRSzfACffFhs AkUg+htYb3Nv2wpN/0ecod8= =hnSU -----END PGP SIGNATURE-----
В списке pgsql-general по дате отправления: