Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

Naming Convention

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Quinn - 04 Mar 2008 17:42 GMT
Where can I find SQL Server 2008 (or 2005) naming convention and coding
practice recommanded by Microsoft?

Thanks

Quinn
Aaron Bertrand [SQL Server MVP] - 05 Mar 2008 19:57 GMT
I don't think you can (they're neither the best nor the most consistent at
it anyway).

Everyone has their own preferences, and there isn't one "perfect" naming
convention.  The most important things are:

(a) the naming convention makes sense to you
(b) those around you can and will adopt it
(c) you stay consistent

For some ideas for formulating your own naming conventions, all you need is
google:

http://groups.google.com/groups/search?q=naming+conventions+group%3Amicrosoft.pu
blic.sqlserver
.*

> Where can I find SQL Server 2008 (or 2005) naming convention and coding
> practice recommanded by Microsoft?
>
> Thanks
>
> Quinn
Gail Erickson [MS] - 07 Mar 2008 00:37 GMT
>I don't think you can (they're neither the best nor the most consistent at
>it anyway).

That's probably an understatement. Anyway, AFAIK, the only documented
recommendation from MS regarding naming conventions in SQL Server is related
to naming stored procedures.  We recommend that you not begin the names of
user-defined stored procedures with sp_. Thisis because that prefix is used
for system stored procedures and can potentially cause conflicts or cause
your stored procedure to never be executed. See
http://msdn2.microsoft.com/en-us/library/ms190669.aspx  for details.

Signature

Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx

>I don't think you can (they're neither the best nor the most consistent at
>it anyway).
[quoted text clipped - 17 lines]
>>
>> Quinn
Aaron Bertrand [SQL Server MVP] - 07 Mar 2008 02:19 GMT
Whoops!  Didn't think I'd get caught.  :-)

> >I don't think you can (they're neither the best nor the most consistent
> >at it anyway).
[quoted text clipped - 6 lines]
> conflicts or cause your stored procedure to never be executed. See
> http://msdn2.microsoft.com/en-us/library/ms190669.aspx  for details.
Ben Nevarez - 06 Mar 2008 07:47 GMT
And to add to Aaron's answer, perhaps you want to take a look at the
AdventureWorks sample databases to see the naming convention and coding
practices used in the database's objects (like tables, indexes, triggers,
stored procedures, etc).

Hope this helps,

Ben Nevarez

> Where can I find SQL Server 2008 (or 2005) naming convention and coding
> practice recommanded by Microsoft?
>
> Thanks
>
> Quinn
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.