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

Home -> Community -> Usenet -> c.d.o.server -> Re: Preferred method in creating primary key

Re: Preferred method in creating primary key

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 13 Aug 2003 15:49:16 -0700
Message-ID: <3F3AC06C.853E3B80@exxesolutions.com>

Brian Peasland wrote:

> It makes some sense that this index is not unique since the constraint
> checking is deferred until you commit. Before the commit, you are
> allowed to insert all the duplicate key values you want, but you must
> remove them before you commit. If the index were UNIQUE, then the
> duplicate key values would not be allowed.
>
> Personally, I've hated deferrable constraint checking since it was
> introduced. We put constraints in the database so that the business
> rules on the data are adhered to. This is especially important since we
> don't trust the application to validate those business rules for us. So
> why do we decide to throw out those business rules "temporarily"? It
> just seemed to me to be a short cut for doing things right the first
> time. Maybe it's just my opinion though...
>
> Cheers,
> Brian
>
> <snipped>

I agree with respect to primary key and unique constraints. They make no logical sense. But they are a logical extension when applied to Foreign Keys.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Aug 13 2003 - 17:49:16 CDT

Original text of this message

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