Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Creating Table as select...
KDB wrote:
> Hi Daniel,
> I read the following in oracle 10g concepts manual:
>
> http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10743/schema.htm#sthref893
>
> <Oracle10gConcepts>
>
> Unique and Nonunique Indexes
> Indexes can be unique or nonunique. Unique indexes guarantee that no
> two rows of a table have duplicate values in the key column (or
> columns). Nonunique indexes do not impose this restriction on the
> column values.
>
> Oracle recommends that unique indexes be created explicitly, and not
> through enabling a unique constraint on a table.
>
> </Oracle10gConcepts>
>
> Can you please comment on this!
>
> --KDB
Don't mind at all Howard. But my answer will be a bit less kind.
Whoever wrote that has little or no experience in the real-world. They are an Oracle employee creating documentation and likely have never had the experience of creating or managing applications in the real-world.
If you are going to create a unique index by all means follow the above advice. A better question is why create one at all? You gain nothing. You lose a lot.
BTW: The question of unique index vs. unique constraint is one I routinely ask during job interviews. Those that don't know the difference don't get hired.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Mon Feb 09 2004 - 01:47:40 CST