Xref: alice comp.databases.oracle.misc:30818
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!feed1.news.rcn.net!rcn!korova.insync.net!uunet!ffx.uu.net!in5.uu.net!iafrica.com!nntp.global.co.za!not-for-mail
From: "Andrew Filmer" <filmeraj@global.co.za.spam>
Newsgroups: comp.databases.oracle.misc
Subject: Re: multiple identical constraints
Date: Wed, 5 May 1999 23:15:21 +0200
Organization: Usko Enterprise Networks
Lines: 39
Message-ID: <7gsirf$63u$1@nntp01.global.co.za>
References: <7gch5t$s9u$1@nnrp1.dejanews.com>
X-Trace: nntp01.global.co.za 926011055 6270 196.3.172.37 (6 May 1999 17:17:35 GMT)
X-Complaints-To: abuse@global.co.za
NNTP-Posting-Date: 6 May 1999 17:17:35 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3

I have done this with multiple imports - first time to import the the data
into pre-created tables, next time to add the views, triggers etc.  The not
null and check constraints imported twice, over and above the constraints on
the tables when I created them, so had 3 sets of duplicate constraints.

There must be somebody out there with a de-duping procedure for these.  Had
a go, but you can't compare long columns to check for duplicates, same
problem as the the import utility has.

I eliminated the duplicates by checking the date changed on the constraint -
if they weren't  part of the original set up, dropped them.  This won't work
in all cases, happened to be OK this time.

Andrew Filmer

dyrdahl@my-dejanews.com wrote in message
<7gch5t$s9u$1@nnrp1.dejanews.com>...
>I am working on a database which someone else created. This is an Oracle 8
>database running on a NT server.  I believe that the tables, indexes, etc.
>were originally created using the graphical interface provided by Oracle.
I
>was looking at the all_con_columns view and noticed that there are numerous
>columns which have duplicate constraints.
>
>In other words, they created a column with a not null constraint.  However,
>there are actually two not null constraints for the same column.  I am
>assuming that this is a bad idea since every update/insert will check the
>same condition twice.
>
>Before I go and drop a bunch of these constraints, I wanted to know if
anyone
>could see why there would be two and also if it matters which one of the
two
>that I drop?  Thanks.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


