Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field Prefix
Message
De
23/09/2003 14:11:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00831460
Message ID:
00831615
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform