Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table naming conventions
Message
De
22/10/2003 21:32:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00841018
Message ID:
00841401
Vues:
21
>Something I think about things that I should not be thinking about (is it called being neurotic <g>?)
>
>I am designing a new database and of course new tables. A few sample databases I see (in VFP and in SQL Server) use convention of naming tables as plural (Categories, Companies, Products, etc.) It has always bothered me why they do that.
>
>I think that naming tables with singular names makes more sense. Like Category, Company, Product, etc. I see a few benefits of using singular names:
>1. Fewer letters to type in code.
>2. When you type COMPANY.ADDRESS it means "one company address", whereas if you type COMPANIES.ADDRESS it is confusing. Am I making sense? <g>.
>3. Ok, not a few, just two <g>.
>
>But there must be reasons why all the database gurus use plural names. What are they?

I find singular more convenient.

One more detail, about naming tables. This is not a convention, but a safety precaution. The name of one table should not be contained within the name of another table, especially at the end. Otherwise, the code generated by the RI-builder might eventually confuse the tables!

Examples: Tables Article, Supplier, ArticleSupplier (the last one is supposed to hold information, about which suppliers can provide which articles). Rename at least the Supplier table to something else (like SupplierMain), to avoid the above-mentioned bug.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform