Solved

SQL Server naming conventions

Posted on 2009-05-11
8
756 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

759 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

23 Experts available now in Live!

Get 1:1 Help Now