From: Chrysalis <cellis@iol.ie>
Subject: Re: Is it necessary to have Primary keys?
Date: 1997/06/06
Message-ID: <3397EB03.5957@iol.ie>#1/1
References: <339572EE.A9A78BAB@isdsa.pgh.wec.com>
Organization: None
Reply-To: cellis@iol.ie
Newsgroups: comp.databases.oracle.misc



1) The purpose of a primary key is three-fold:
.  to enable the unique identification (and location) of a given row
.  thereby to prevent duplicate rows being stored
.  to ensure that related rows have something to relate to
2) Relational purists insist that a table without a primary key is not a
relation within the fullest definition of the term.
3) Oracle does not insist on primary keys.
4) The inclusion of a date column in a primary key *is* a good idea in
many cases (and may be essential for any/all of the reasons in 1).  
5) Having a date-time column as a *non-leading* part of the key does not
carry a particularly large overhead.

Hope this helps.

Chrysalis.

Lisa M. Lewis wrote:
> 
> Could anyone tell me if it is necessary to have Primary Keys defined on
> all tables in your database.  Are there any disadvantages to not having
> primary keys defined?  This particular database is used only to run
> large batch transactions against for gathering statistics, etcs.  I will
> have duplicate records in my table ( except perhaps for the date/time).
> I don't believe it is wise to put a date in a primary key.  I'm a little
> concerned because I have always heard that it is necessary for each
> table to have a primary key.  Can anyone shed some light on this for
> me??
> 
> Thanks in advance
> 
> Lisa


