Solved

SQL Server naming conventions

Posted on 2009-05-11
8
757 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
  • 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
 

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
Backup Your Microsoft Windows Server®

Backup 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: 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now