Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Prefix
Message
From
23/09/2003 14:11:55
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00831460
Message ID:
00831615
Views:
13
>I am creating a new database should I prefix the fields with their type

Hi John,

You've heard some people go pretty strongly against prefixes for field names. Here's an alternative view: After years of not prefixing them, I now ALWAYS prefix. I've just been burned too many times (i.e. twice) using reserved words that I hadn't realized were reserved words. These issues came back to haunt me YEARS later, and took DAYS to figure out the problem. I can personally attest to the fact that using reserved words as field names can definately bite you in the rear big time. They can be very difficult issues to find and fix.

I just use single letter prefixes - i.e. "i" for integer, "d" for date, "c" for char, etc. They've never really proven useful in terms of needing to identify the type of field - usually that's pretty obvious, I find. They just provide a pretty good way of guaranteeing that you do not use reserved words, and by doing it in all cases and consistently, your system will be easier to follow.

Good luck,

David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform