Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is the use of VARCHAR(256) as Primary Keys preferred in Oracle?
"Paul Brewer" <paul_at_paul.brewers.org.uk> wrote in
news:3dd8142b_1_at_mk-nntp-1.news.uk.worldonline.com:
> Personally, if a 'natural' VARCHAR2 key of reasonable length (say
> 4 to 12) were available, I for one would not be inclined to invent a
> numeric surrogate key.
I would dissuade folks from using natural keys as their primary key. Using surrogate keys gives the application a layer between the business (primary key) and the implementation (surrogate key).
Business rules change and what someone says will _never_ happen is ephemeral.
I would still use the natural key but as an alternate key with a UNIQUE constraint on it.
-- Pablo Sanchez, High-Performance Database Engineering http://www.hpdbe.comReceived on Sun Nov 17 2002 - 22:35:16 CST