Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server naming conventions
Message
De
14/07/2005 10:00:13
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01031553
Message ID:
01032616
Vues:
18
>My conventions are:
>
>Fields:
>No spaces on field names, EVER!
>The PK of a table is always named ID (or the same for all tables), and when using it as a FK the convention is (tablename)ID (I write a lot of dynamic SQL and DMO, this makes things easier) - it also forces you to write readable SQL by using the (table).(field name) convention
>
>Tables:
>Use the tbl Prefix (tblCustomers) - very optional
>
>
>SP:
>Never preffix with sp_ (forces an extra trip thru the Master DB before resolving in current DB)

Now that's one for the standards book!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform