Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field name tips wanted
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00452241
Message ID:
00452708
Views:
17
Brenda,
This is only my $.02 US, and may end up provoking an argument. We've found that using a 2 character prefix for each table really helps down the line. Yes it cuts the "usable" characters to 8 but the advantage is that each table has individual fields. The ID (Primary key) field is always the 2 chars plus "ID", eg PRID. Foreign Keys in a child table are always the child table prefix plus an underscore plus the primary table's ID, eg ST_PRID. We try to use identical names (except for the prefix) for identical fields if any. In SELECT-SQL this becomes very useful because there is never a confusion about the source of any field. A side benefit is that the prefix makes it possible to use "reserved" words - STDesc or PRCount no longer affect VFP but are easy to read.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform