Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non data bearing primary keys
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00106667
Message ID:
00107136
Views:
25
>We add a 2-char prefix to each field which is unique to the table. If the primary key in one table is ODID then the foreign key in a child table will be PR_ODID. Even SQL code is simplified when we know that a field name is unique to a table.

Yes that is true. I personally do not like the two character prefix. I used to use it all the time. I found it to be redundant becasuse I seemed to always to access my fields by table.fieldname. In witch case I know what table I'm using. What I have switched to is more descriptive field names with a single type idenifer in the front (i - integer, c- char, etc). The PK is always tablenamePK and any forgin keys are forgintablenameFK. I found it to work for me. Naming conventions are so personal though <g>.
Chad Gronbach
Blackstone, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform