Re: artificial keys or not?

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: Hannes Dorbath <light(at)theendofthetunnel(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: artificial keys or not?
Date: 2005-04-22 22:29:27
Message-ID: BE8ED6E7.21FC1%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> ..so the only question is:
>
> drop the the serials as PKs and just use short text handles? our
> database size is arround 290 mb. there shouldn't be speed issues as long
> as proper indexes exit, right? some of the conditions are dynamic
> though, so there can't be an proper index in any case. any other concerns?

Someone (a manager) somewhere (probably marketing) sometime (when you least
expect it) will demand that those short text names be changed, possibly for
a completely irrational reason. I know there are still text books that claim
that artificial keys are evil for some inscrutable reason, but hard
experience has taught me to never, ever, under any circumstance, make a
primary key out of data that comes from humans, and to be very suspicious of
using data that will be visible to humans.

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 665-7007 voice

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2005-04-22 22:32:11 Re: Migrating MySQL app to postgres?
Previous Message David Roussel 2005-04-22 22:29:24 Re: Migrating MySQL app to postgres?