D
David W. Fenton
There were once very good
arguments for using surrogate keys even if a table had a real
primary key, but I believe that they have mostly gone away.
I will use a natural key if:
1. it's not functioning as foreign key in another table,
AND/OR
2. it's a single-column key.
I'll use a single-column natural key as a foreign key, but never a
multi-column natural key.
Also, natural keys make join tables extraordinarily ugly and
difficult to work with.
And the benefits are so very slight that it's not worth the
complications.
Perhaps it's a result of the particular apps I have been called upon
to build, but I've almost never encountered a single table in any of
the apps I've built (other then the tables that meet the criteria
above) where a multi-column natural key was possible. My customer's
data is never complete enough to allow it (i.e., they need Nulls).