On Fri, 7 Jul 2006 19:37:15 +1200
"David Clarke" <pigwin32@gmail.com> wrote:
> > And even given all of that, I would probably still use serial.
> Because?
Simplicity. Cleanliness.
> > Danger, Will Robinson. The phrase "regenerate my primary key"
> > immediately raises the hairs on the back of my neck. If the primary
> > key can ever change, you have a broken schema.
>
> Perhaps my choice of words was somewhat hasty. A serial is totally
> divorced from the data it represents whereas a md5 hash is (for my
> purposes) unique, stable, verifiable, and simple.
It's not that I think that the primary key should never have meaning in
the database (I use the two letter country code as the PK in my country
table for example) I just think that it's dangerous ground and should
be tread very carefully.
However, I join others in applauding you for your efforts to investigate
this so deeply. You may wind up coming out of this with something
interesting, even if it isn't what you went in looking for.
--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.