SQL Server naming conventions

Please review attached document, and indicate any issues you find and/or provide suggestion where required.


rSQL-Naming-Conventions-Standard.doc
robertkcAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
Hello robertkc,

i would prefer columnNames instead of Incremental numberwhich will be easier for you to identify
for example a foreign key can be like
     fk_MasterTable_ChildTable_ColumnName  (in case of column Names are the same )
    or
    fk_masterTable_ChildTable_MasterColumnName_ChildColumnName

same as index
idx_TableName_Column1_Column2


Regards,

Aneesh
0
 
robertkcAuthor Commented:
@aneeshattingalD

Reason for Incremental Number,
Is because there may be multiple columns on these objects. And at somepoint it may break your naming pattern, now your names will not follow a single pattern.

It also seems that the names may either get longer than is comfortable (and beyond server name limits at some point in time)

Based on these considerations, the alternative approach was to use incremental numbers.

0
 
Aneesh RetnakaranDatabase AdministratorCommented:
the main advantage of putting the you can easily get the definition of the key from the name itself, if you put the numbers, then, you have to check the definition.
I agree, the name will be longer thats the disadvaantage
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
robertkcAuthor Commented:
To be honest I like your naming pattern and I was using your naming convention previously but was later told not to use it. -- name too long for multiple columns etc... = bad.
0
 
robertkcAuthor Commented:
0
 
robertkcAuthor Commented:
This should be the final version, unless im missing something.
SQL-Naming-Conventions-Standard-.doc
0
 
St3veMaxConnect With a Mentor Commented:
Rob,

Here's a version I've written some time ago.

HTH
Document-Control.doc
0
 
robertkcAuthor Commented:
Free points.
0
All Courses

From novice to tech pro — start learning today.