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: does a table always need a PK?

Re: does a table always need a PK?

From: Paul <paul_at_not.a.chance.ie>
Date: Sat, 23 Aug 2003 18:28:07 +0100
Message-ID: <MPG.19b1b482826a20ab989723@news1.eircom.net>

cbbrowne_at_acm.org says...

> You almost certainly should have a UNIQUE primary key on every relation.

Maybe this true in theory, but not essential in practice?

I'm not being facetious here.

Take an example that I recently worked on - we have a lookup table of 26 counties (in Ireland) which really has a very small about of data in it, say max. 1.5K.

Now, as I understand it, RDBMS's will look at the size of a table before scanning it to see if it's worthwhile using an index, and if the table is too small, it'll just perform a straigh scan anyway and not bother with the index, even if you've gone to the trouble of putting one in.

AFAIK, this is true for the RDBMS's that I use (Interbase, FireBird and PostgreSQL).

Any thoughts, rants, references, URLs on this topic welcomed.

Paul...

-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

p.s. just lacerated a tendon in left hand, so pls 
excuse typos and tricky abbrevs - TIA.
Received on Sat Aug 23 2003 - 12:28:07 CDT

Original text of this message

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