Re: Natural keys vs Aritficial Keys

From: Jonathan Leffler <>
Date: Wed, 20 May 2009 23:59:01 -0700
Message-ID: <>

Walter Mitty wrote:
> I'm confused about some recent trends in database design.
> When I learned databases, about a quarter of a century ago, the preferred
> practice was to use natural keys to refer to individual table rows, unless
> there's some real good reason to go with an artificial key. I've run into a
> few cases where I chose to use an artificial key, but most of the time I've
> used a natural key. [...]

Somebody mentioned in an answer on StackOverflow that (Ruby on) Rails requires all tables to contain a column called 'id' (and, by implication, that column should be an 'identity' column or auto-generated value). (I've not verified that this is so.)

I've also seen numerous suggestions that modern web-ish environments (Rails, etc) get confused by composite keys.

In all cases, the problem seems to be a lack of understanding.

Jonathan Leffler                   #include <disclaimer.h>
Guardian of DBD::Informix v2008.0229 -- tiger128 2009-05-21 06:00:05
Received on Thu May 21 2009 - 08:59:01 CEST

Original text of this message