Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How long is long enough for primary key ?

Re: How long is long enough for primary key ?

From: joel garry <joel-garry_at_home.com>
Date: 9 Oct 2006 13:23:04 -0700
Message-ID: <1160425384.672687.77450@m73g2000cwd.googlegroups.com>

EdStevens wrote:
> krislioe_at_gmail.com wrote:
> > Hi,
> > Thank you for your response.
> >
> > > why not use that for PK?
> > >Adding an extra index (PK + UK) will
> > >cause extra overhead on inserts, which
> > >will affect performance negatively.
> >
> > I don't use PORef as PK , because the user should be able to change it.
> > That is the reason.
> >
> > I have no other choice but using PK+UK, do I ?
> >
> > Thank you,
> > xtanto
> >
> <snip>
>
> Interesting. If the PORef is user (customer?) supplied, and you define
> it as unique, how do you guarantee that customer "A" doesn't supply the
> same PO# as customer "B"?

Not only that, how do you know customer A isn't going to supply the same PORef as customer A? Silly as it sounds out of context, many commercial ERP system have company or divisional attributes as part of a compound key, but users don't necessarily tell their vendors that. Also, some people haven't mentally moved into the computer age, so every PORef might be "Per Susan." You (xtanto) might consider a non-unique customer+PORef key.

jg

--
@home.com is bogus.
Biting my tongue:
http://www.regdeveloper.co.uk/2006/10/09/oracle_sunopsis/
Received on Mon Oct 09 2006 - 15:23:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US