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

Home -> Community -> Mailing Lists -> Oracle-L -> Enforcing Uniqueness

Enforcing Uniqueness

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Thu, 31 Aug 2000 14:19:09 -0500
Message-Id: <10605.116018@fatcity.com>


Hello listers,
 We are discussing with some developers as to what is the best way to enforce unique constraint on some of the tables in one particular application. I thought I would ask you all for your opinion as well.  Some of these tables have just one or two columns (sort of look up or reference tables). All column data must be unique. What would make more sense : (a) have a before insert trigger or (b) create regular PK constraint using an index. There are no other RI on theses tables. We will consider IOT when we go to oracle 8.x. Currently these are in a 7.3.4 db. These tables have less than 2000 rows.. less than 2% growth per year.  So what would you suggest? A Trigger or a PK constraint. What are the pros and cons?
 Thanks..
- Kirti Received on Thu Aug 31 2000 - 14:19:09 CDT

Original text of this message

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