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: One Conceptual Question

Re: One Conceptual Question

From: Craig M. Wall <cwall_at_petersons.com>
Date: Sun, 26 Jul 1998 18:14:53 -0400
Message-ID: <6pg9kp$78e@news9.noc.netcom.net>


>>If i create a unique index,the raws will be arranged by the index.

Ahh... No,
Just to put a fine point on this possible misconception...

Rows within a table are not physically "arranged", ordered or otherwise sequenced by the presence of an index on any of it's columns. That is, the occurence or placement of rows in an Oracle table is independent of whether or not an index is present on one or more columns.

Unless of course, you've created an "Index-only table", but that's another kind of animal and available only in Versions 8.0+.

Regards,
Craig M. Wall

Winnie Liu wrote in message <6pbnuq$3pb_at_sjx-ixn4.ix.netcom.com>...
>Primary key is to enforced each row are unique to each other. No two rows
>will be the name and it can be uniquely identified by a key (Primary key).
I
>think it is the 3rd normalization rule. Since it is going to be a unique
>identifier, it got to be unique and not null. A unique index will be
>automatically created by Oracle when you enforce the primary key
constraint.
>But you can also create your own unique index and then enable the primary
>constraint. Then Oracle will use your index instead of creating another
one.
>
>You can always create some other unique index on other columns (for
example,
>secordary primary key). You can create as many unique index as you want.
But
>there will always be one primary key.
>
>As for foreign key, it is to enforce that the content in the child table
>must exist in the parent's table. And the content in the parent table
cannot
>be deleted unless the corresponding content be deleted in the child table.
>This is to enforce the consistency of the data between parent and child
>table.
>
>Hope it can help! =D
>
>Winnie
>
>Violin wrote in message <35b950f7.13463390_at_172.16.7.252>...
>>Hello,
>>I'm a little confused about index,primary key, foreign key,
>>If i create a unique index,the raws will be arranged by the index.
>>But what are primary key and foreign key purpose??
>>Thanks for your explanation!
>>
>>Violin
>
>
Received on Sun Jul 26 1998 - 17:14:53 CDT

Original text of this message

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