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?
"Jim" <no-spam_at_no-spam.org> wrote in message
news:lh1itu0ibhtnjt28jal4ne6ou7e6j1n267_at_4ax.com...
> I confess I don't understand the preference for the use of a surrogate
> key instead of a natural key except in special cases.
>
> I can see that a surrogate, "artificial" key would have some value IF
> all "natural" columns in a table must be updatable, IF no 'natural'
> column, or reasonable combination of 'natural' columns, would be
> unique, and IF all updating of the table would be perfomed by
> application programs able to deal with the essentially meaningless
> surrogate key.
>
> On the other hand, use of a 'natural' key composed of column(s)
> understood and meaningful to the user would, it seems to me, yield a
> more straightforward, easier for the user to understand design.
>
> Am I missing something (probably)?
Natural keys tend, in practice, to be either
In addition I'm tempted to ask why should the user know about a key at all. Most answers to this question assume a knowledgable user familiar with database concepts (for example a report developer) who is quite capable of using surrogate keys.
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ******************************************Received on Mon Nov 18 2002 - 10:56:49 CST