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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Primary Key Theory Question

Re: Primary Key Theory Question

From: Leandro Guimar„es Faria Corsetti Dutra <leandro_at_dutra.fastmail.fm>
Date: Sun, 28 Mar 2004 17:17:54 -0300
Message-ID: <pan.2004.03.28.20.17.52.925616@dutra.fastmail.fm>


Em Sun, 28 Mar 2004 18:56:03 +0000, Ben escreveu:

> I have decided to do the
> design work as 'properly' as possible. So, I've been reading through posts
> in this group for most of a day. While I wait for Celko's books to arrive,
> I thought I'd put a question to the gurus here.

        For doing things properly, I do think Date to be a better source.

> I've come to a conceptual impasse regarding primary keys. In doing my pen
> and paper design work and I've come up with two issues: Some of my
> entities can only be uniquely identified by all of their properties and
> some of my entities have good candidate keys, but in real life, that data
> might not be known.

        The rule of thumb seems to be, use a natural key when it is practical to do so, say there is at least one composed by two or three field. Over that, use a surrogate key, but do keep the natural key(s) as well.

        In fact every candidate key should be declared and enforced, the primary key distiction among candidate keys is pretty much arbitrary, needed because of practicality in SQL or general DB administration and usage, not because of conceptual considerations.

-- 
Leandro Guimar√£es Faria Corsetti Dutra           +55 (11) 5685 2219
Av Sgto Geraldo Santana, 1100 6/71               +55 (11) 5686 9607
04.674-000  S√£o Paulo, SP                                    BRASIL
http://br.geocities.com./lgcdutra/
Received on Sun Mar 28 2004 - 14:17:54 CST

Original text of this message

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