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: foreign key constraints and indexes

Re: foreign key constraints and indexes

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 30 Nov 2001 18:20:47 GMT
Message-ID: <36QN7.5070$726.2788246@news1.sttln1.wa.home.com>


You need to create the index. If you don't you will lock the parent table when you insert.

Jim
"ayrobins" <anthony_at_lumos.com> wrote in message news:u4QN7.120$P25.15044_at_dca1-nnrp2.news.digex.net...
> Hi,
>
> Sorry if this question was asked before.
>
> Some databases create non-unique indexes when a foreign key constraint is
> created. i.e.
> create table test2
> (id number, id2 number unique, constraint fk_test2 FOREIGN KEY (id)
> references test(id));
>
> So a non unique index would be created on id in test2.
> Oracle does not seem to do this.
>
> However, it does this for primary keys and unique constraints.
>
> Is this a configurable thing? Can i make oracle do it automatically or do
i
> need to manually create
> the index.
>
> thanx in advance.
>
>
Received on Fri Nov 30 2001 - 12:20:47 CST

Original text of this message

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