Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do I need a PK?
Message
From
05/04/2001 07:07: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:
00492265
Views:
18
>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.

PKs are used for alot more than that. Say you want to remember the record number the user was last browsing. If the table is packed between his sessions, storing the record number won't work because may have changed, you need another way to find out what record he was on. Or how about identifying between classes what record to process. If both of your code snippets are using cursors, you can safely pass the PK from object to object and the correct record will be used on both sides. Lots of stuff like that...

Like Erik said, it doesn't matter how its derived, jst as long as you got one and its unique.
Previous
Reply
Map
View

Click here to load this message in the networking platform