RE: Primary Keys optional?

  • From: "Mercadante, Thomas F \(LABOR\)" <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>
  • To: <andert@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 17 Aug 2006 13:16:15 -0400

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Stephen Andert
Sent: Thursday, August 17, 2006 12:47 PM
To: oracle-l@xxxxxxxxxxxxx
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/
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l


Other related posts: