views:

59

answers:

2

I found Naming Guidelines from MSDN, but is it any guideline for MSSQL database from Microsoft?

+1  A: 

No, there isn't but the practices in the link you provided are good to keep in mind.

With respect to naming stored procedures - do not prefix them with "sp_" You can read more about why in this link:

"Do not prefix stored procedures with sp_, because this prefix is reserved for identifying system-stored procedures."

OMG Ponies
I added the relevant quote from the article because it's short, and we can't expect a link to a 5-year-old post to last forever.
Gabe
+3  A: 

The naming conventions used in SQL Server's AdventureWorks database demonstrate many best practices in terms of style.

To summarize:

  • Object names are easily understood
  • Table names are not pluralized ("User" table not "Users")
  • Abbreviations are few, but allowed (i.e. Qty, Amt, etc.)
  • CamelCase used exclusively with the exception of certain column names (i.e. rowguid)
  • No underscores
  • Certain keywords are allowed (i.e. Name)
  • Stored procedures are prefaced with "usp"
  • Functions are prefaced with "ufn"

You can find more details here:

One caveat: database naming conventions can be very controversial and most database developers I've met have a personal stake in their style. I've heard heated arguments over whether a table should be named "OrderHeader" or "OrderHeaders."

8kb