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 -> Cluster index / Constraint Index conflict?

Cluster index / Constraint Index conflict?

From: Sean Zhang <sean_at_cnfei.com>
Date: Sat, 29 May 1999 01:24:05 GMT
Message-ID: <VkH33.2355$AO1.6915158@firenze.visi.net>


Hello, Everyone,

The following is a problem with Oracle Index I can't resolve, Please give me your valuable advises. Thank you.

Enviroment: Oracle 8i in Sun Solaris 2.6. Problem: Suppose I have 2 tables to be clustered together like the following:

    Master table : <invoices> with columns like : ( invoice# Number(7) Primary key, ....)

    Detail table: <Items> with columns like: ( invoice# Constraint F_key references Invoices(invoice#),

part# varchar2(20),..........

........

Constraint P_key primary key ( invoice#, part#)                                                                             

 ).

  If I want to Cluster the 2 tables on column <Invoice#>, an index must be created on

   the cluster key <INVOICE#>. But in order to enable the Primary key on the detail table,

    a second index on <INVOICE#, PART#> must be created. I understand the same key

   <Invoice#> can only be indexed once, so How can I have the cluster and at the same time
  be able to Enable the Primary key in detail table?

Sean Zhang
mailto:sean_at_cnfei.com Received on Fri May 28 1999 - 20:24:05 CDT

Original text of this message

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