Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do I need a PK?
Message
From
03/04/2001 10:39:10
 
 
To
03/04/2001 10:36:11
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00491302
Message ID:
00491307
Views:
12
>I have a table in my Database that just relates to other Parent tables on a one-to-one basis.
>
>I suggested we have a PK of it's own because it doens't have one, but my Analyst said we don't need one because it doesn't have any child tables.
>
>Can I have some views/preferences on this?
>I prefer to always have a PK no matter what?
>

ALL tables need a primary key.

If it's a one to one with another table (it's fields could logically be placed in the other table), then I see no problem with the tables sharing a PK. In other words the primary key for one table would be duplicated in the other. In this sense, the PK is really a foreign key to the main table, but since it's one to one, it's unique enough to use as the PK.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform