PK & FK & Index Question

Поиск
Список
Период
Сортировка
От L D
Тема PK & FK & Index Question
Дата
Msg-id BAY120-W14B9D62D95DF7DDBF8794BBBC80@phx.gbl
обсуждение исходный текст
Ответы Re: PK & FK & Index Questio  ("Rodrigo De León" <rdeleonp@gmail.com>)
Список pgsql-sql
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> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Tolley"
Дата:
Сообщение: Re: pg & Delphi
Следующее
От: "Rodrigo De León"
Дата:
Сообщение: Re: PK & FK & Index Questio