Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field naming conventions in SQL
Message
De
11/12/2000 11:50:14
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00450333
Message ID:
00451643
Vues:
28
Hi Houston.

>When it comes to indicating data type, why should field names be any less appropriate than variables (and in my case properties)?

I don't think it's inappropriate; I just consider it unnecessary. In the case of variables and object properties, there's no way to know what type of data can be stored in them, so a naming convention tells other developers (and yourself <g>) what data type to use and expect since VFP won't give an error when you try to store the wrong data type to a value or custom property. However, in the case of a field, doing something REPLACE COMPANY WITH 5 will result in an error if COMPANY is Character. Also, if I need to check the data type of a field in a table, it takes about 5 seconds to USE and DISP STRU.

Of course, I certainly wouldn't suggest that someone stop using such a convention if they're comfortable using it. I just personally haven't needed such a convention in my 20 years of development experience.

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform