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: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: 7 Oct 2006 14:01:17 -0700
Message-ID: <1160254877.791769.250330@e3g2000cwe.googlegroups.com>


Just in case a logical argument suits you better than appeals to authority here's a proof by contradiction. The following schema satisfies 5NF (there are no non-trivial FDs and no join dependencies).

R {A,B} KEY {A,B}
S {A,C} KEY {A,C} FDs:
{A,B}->{A}
{A,B}->{B}
{A,C}->{A}
{A,C}->{C}

By your definition R and S are not in 2NF but that would contradict established proofs about synthesis, which demonstrate that 3NF is achievable given any set of FDs (see Maier and also Abiteboul, Hull, Vianu in Foundations of Databases). If a relation schema is in 3NF then it is in 2NF by definition.

This tiny example also demonstrates why primary keys are inadequate for the purposes of normalization. The projection {A,B,C} cannot be normalized by decomposition unless BOTH candidate keys are used as determinants. By extension, your earlier remark about 3NF is also incorrect. This is perhaps a more forgivable mistake because Codd's early examples often mention only primary keys and don't give formal definitions. Unfortunately that has left us with a legacy of some sloppy definitions in the technical literature, especially in online sources. Of course there is an enormous amount of rubbish written about normalization online so I trust there's no danger of you taking what I say for granted! Do check out the sources I've mentioned though :)

-- 
David Portas
Received on Sat Oct 07 2006 - 16:01:17 CDT

Original text of this message

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