Sunday, March 25, 2007

Natural vs artificial primary keys

A never ending discussion is about natural vs artificial primary keys in the database. There are so many fundamentalists in this area. I found a really good article in this area called "What should I choose for my primary key?".

I really agree in what they say in the summary "In the end, nobody can really tell you whether you should use an IDENTITY or a GUID(), or whether you should use a natural or artificial key; they can guide you, certainly, but nobody knows your data and intent better than you.".

There are no way to do this that always is the best. Use whats best in the current situation. Never be a fundamentalist.

No comments: