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

Home -> Community -> Mailing Lists -> Oracle-L -> Surrogate Keys

Surrogate Keys

From: <kirschw_at_hoffman.army.mil>
Date: Mon, 17 Jul 2000 15:18:47 -0400
Message-Id: <10561.112206@fatcity.com>


I'm in the mud over implementing surrogate keys in master-child tables. For example,

table master (

   master_sug_key number primary key -- generated by nextval , datam char
)

table child (
  child_sug_key number primary key -- generated by nextval , master_sug_key number foreign key not null , datac char
)

If I then use ERWin to draw the E-R diagram, I get two independent entities, unless I also include the
element "master_sug_key" as part of the primary key in the child table, Should I, should I not, or doesn't it matter? Am I missing something basic here? The indexes will be fewer if I do include "master_sug_key" in child's primary key. Any pointers gratefully accepted. Received on Mon Jul 17 2000 - 14:18:47 CDT

Original text of this message

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