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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Primary Keys optional?

RE: Primary Keys optional?

From: Guerra, Abraham J <AGUERRA_at_amfam.com>
Date: Thu, 17 Aug 2006 11:53:16 -0500
Message-ID: <A787F31512A25E4F9782045CFE320C80156F01A5@NHQ1ACCOEX05VS1.corporate.amfam.com>


Is there referential integrity? You need PK for RI.

Abraham Guerra

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Stephen Andert Sent: Thursday, August 17, 2006 11:47 AM To: oracle-l_at_freelists.org
Subject: Primary Keys optional?

OK, just starting a new job with more design than I have done in a while. Looking into things, I have been noticing that many tables have no PK. Some have a unique index, but not all.

When I pointed this out to folks (developers) they shrugged and said "if you need a PK, then create one".

So my questions are:

  1. Is it considered acceptable to have a unique index instead of a pk?
  2. What are the circumstances when a table might be allowed to exist without any sort of primary key or unique index? (i.e. temp table, static small table, etc)

Thanks In Advance

--

Stephen Andert
http://spaces.msn.com/andert-news/
--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Thu Aug 17 2006 - 11:53:16 CDT

Original text of this message

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