Solved

SQL Server naming conventions

Posted on 2009-05-11
8
763 Views
Last Modified: 2012-08-13
Please review attached document, and indicate any issues you find and/or provide suggestion where required.


rSQL-Naming-Conventions-Standard.doc
0
Comment
Question by:robertkc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 total points
ID: 24361026
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
 

Author Comment

by:robertkc
ID: 24361096
@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
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24361115
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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:robertkc
ID: 24361227
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
 

Author Comment

by:robertkc
ID: 24361239
0
 

Author Comment

by:robertkc
ID: 24362124
This should be the final version, unless im missing something.
SQL-Naming-Conventions-Standard-.doc
0
 
LVL 13

Assisted Solution

by:St3veMax
St3veMax earned 250 total points
ID: 24363099
Rob,

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

HTH
Document-Control.doc
0
 

Author Closing Comment

by:robertkc
ID: 31580397
Free points.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
monitoring configuration for SQL server DB 32 60
denied execute as 13 57
only show the last 365 days 6 33
efficient backup report for SQL Server 13 79
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question