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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Help: What is the difference between UNIQUE and PRIMARY KEY?

Re: Help: What is the difference between UNIQUE and PRIMARY KEY?

From: Steve Long <steven.long_at_erols.spamfree.com>
Date: Tue, 17 Apr 2001 21:22:19 -0400
Message-ID: <9biqdh$jop$1@bob.news.rcn.net>

actually, one of the goals of a "good" data model is to design the model so that nulls are non-existent. perhaps the design is unfamiliar, but it may be very good if nulls are never permitted.

it just depends...

"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3adc192d$0$15025$ed9e5944_at_reading.news.pipex.net...
> This explanation makes sense when you think of relational theory
>
> If a table is normalized as much as possible then each record must be
> uniquely identifiable and there must be a value for each row which
 uniquely
> identifies it. I'd go further and suggest that if as well as a primary key
> you also find yourself making unique,not null constraints on non-key
 columns
> something has gone awry with the db design. (or possibly the
 implementation
> we have an app where every field in every table is not null and has an
> associated default value this doesn't feel like good design to me).
>
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> "Steve Bell" <swayne.bell_at_sympatico.ca> wrote in message
> news:3AD590A9.D5785B7A_at_sympatico.ca...
> > Hi,
> >
> > A unique field requires that each entry be different (unique) from every
> > other record OR NULL.
> >
> > A primary key imposes a second condition, namely the NOT NULL
> > condition...so, the field must be both unique and not null.
> >
> > Hope this helps,
> > Steve
> >
> > u518615722_at_spawnkill.ip-mobilphone.net wrote:
> >
> > > I searched against metalink and could not find the
> > > definition of unique index, could somebody help
> > > me out?
> > >
> > > Thanks
> > >
> > >
> > > --
> > > Sent by dbadba62 from hotmail subpart of com
> > > This is a spam protected message. Please answer with reference header.
> > > Posted via http://www.usenet-replayer.com/cgi/content/new
> >
>
>
Received on Tue Apr 17 2001 - 20:22:19 CDT

Original text of this message

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