General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only