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: Mercadante, Thomas F \(LABOR\) <Thomas.Mercadante_at_labor.state.ny.us>
Date: Thu, 17 Aug 2006 13:16:15 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FF681510@EXCNYSM0A1AJ.nysemail.nyenet>


Stephen,

It sounds like the developers don't know enough about relational design to care. I would insist and create PK's on every table. And then I would start creating and enforcing FK's. You have just been appointed new sheriff in town. So you get to insist and create all relationships in the database. You will be happy you did!!

Good Luck!

Tom



This transmission may contain confidential, proprietary, or privileged information which is intended solely for use by the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure, dissemination, copying or distribution of this transmission or its attachments is strictly prohibited. In addition, unauthorized access to this transmission may violate federal or State law, including the Electronic Communications Privacy Act of 1985. If you have received this transmission in error, please notify the sender immediately by return e-mail and delete the transmission and its attachments.

-----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 12:47 PM 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 - 12:16:15 CDT

Original text of this message

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