Thread: PK & FK & Index Question

PK & FK & Index Question

From
L D
Date:
Hi All,<br />  <br /> Assume the following have a one-to-one relationship:<br />  <br /> team_contact<br />     
team_contact_id (PK)<br />      first_name<br />     last_name<br />      ...<br />  <br /> team_contact_contacts<br />
    team_contact_id  (FK)<br />      home_phone<br />     work_phone<br />      ...<br />  <br />  <br /> Should I set
thelatter table's FK also to PK?  If so, do I need to set an index on the FK even though it's also the primary key?<br
/> <br /> Alternatively, I could just add a UK contraint to FK and do away with PK, right?<br />  <br /> Thanks.<br />
 <br/> --Lenard    <br />  <br />  <br />  <br /><br /><hr />Connect to the next generation of MSN Messenger  <a
href="http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline"target="_new">Get it
now!</a> 

Re: PK & FK & Index Questio

From
"Rodrigo De León"
Date:
On 9/2/07, L D <lenardd@hotmail.com> wrote:
>  Should I set the latter table's FK also to PK?

It's sane.

> If so, do I need to set an index on the FK even though it's also the primary key?

No need to do so.