PK & FK & Index Question

Поиск
Список
Период
Сортировка
Искать

PK & FK & Index Question

От:
L D <lenardd@hotmail.com>
Дата:
 Hi All,
 
Assume the following have a one-to-one relationship:
 
team_contact
     team_contact_id  (PK)
     first_name
     last_name
     ...
 
team_contact_contacts
     team_contact_id  (FK)
     home_phone
     work_phone
     ...
 
 
Should I set the latter 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?
 
Alternatively, I could just add a UK contraint to FK and do away with PK, right?
 
Thanks.
 
--Lenard   
 
 
 


Connect to the next generation of MSN Messenger  Get it now!

Re: PK & FK & Index Questio

От:
"Rodrigo De León" <rdeleonp@gmail.com>
Дата:
On 9/2/07, L D  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.

FAQ