SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Naming Convention


Database Naming Convention

Author
Message
RonKyle
RonKyle
SSCertifiable
SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)

Group: General Forum Members
Points: 6874 Visits: 3620
The mandated standard here is 4 characters vice 5.


I have some short names. If I remove my two letter prefix I already outlined (db, sa, dw) most would fit the 4, but without someone giving a compelling reason, that seems to me foolishly arbitrary. Even DOS let you have 8 characters, a limit which, while still somewhat arbitrary, is at least more reasonable.



Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97199 Visits: 33013
RonKyle (7/31/2013)
Most would probably say it's overkill, but I prefix my OLTP databases with db, my staging areas with sa, and my OLAP database with dw. The names are otherwise short and clear.


Why? What do you get out of it that a clear name doesn't give you?

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97199 Visits: 33013
Nemeaux (7/31/2013)
So what do you all think about database names as short as 5 characters in length? Which is a standard that is mandated where I work?


Same question, why? What does that accomplish.

Oh, and I've worked on servers with a couple of hundred databases. 4 characters each... what a nightmare. A friend is working on one with 2500 databases. Again, 4 characters will do... what exactly for you?

Seems like a sure path to confusion and difficulty. Standards like this don't help anyone, they get in the way and slow things down.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
RonKyle
RonKyle
SSCertifiable
SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)

Group: General Forum Members
Points: 6874 Visits: 3620
RonKyle (7/31/2013)
--------------------------------------------------------------------------------
Most would probably say it's overkill, but I prefix my OLTP databases with db, my staging areas with sa, and my OLAP database with dw. The names are otherwise short and clear.


Why? What do you get out of it that a clear name doesn't give you?


It allows reuse of the same name. All of the OLTPs have a corresponding staging area only for them. After the initial processes they are sent to centralized staging area so the data can be conformed across all incoming data. That final staging area and the OLAP data warehouse database also have the same same. So if I have two OLAP databases called CARS and FINANCE and my company name is KYLE, you would see the following database names.

dbCARS, whose staging area is saCARS. The sa is a further indication that the database is NOT querable (per Kimball). dbFINANCE has saFINANCE. Both sa s feed into saKYLE, which conforms the data and in some cases puts data in 3NF where necessary. Finally the data feeds into dwKYLE.

The dbs are not on the same server as the sa and dws but I think it makes it easier to see the flow, and on the OLAP server groups the databases nicely. I do have a dbETL on that server, which stores all the information about the ETL processes. As it has a db prefix, it is a querable OLTP database.



Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97199 Visits: 33013
RonKyle (8/1/2013)
RonKyle (7/31/2013)
--------------------------------------------------------------------------------
Most would probably say it's overkill, but I prefix my OLTP databases with db, my staging areas with sa, and my OLAP database with dw. The names are otherwise short and clear.


Why? What do you get out of it that a clear name doesn't give you?


It allows reuse of the same name. All of the OLTPs have a corresponding staging area only for them. After the initial processes they are sent to centralized staging area so the data can be conformed across all incoming data. That final staging area and the OLAP data warehouse database also have the same same. So if I have two OLAP databases called CARS and FINANCE and my company name is KYLE, you would see the following database names.

dbCARS, whose staging area is saCARS. The sa is a further indication that the database is NOT querable (per Kimball). dbFINANCE has saFINANCE. Both sa s feed into saKYLE, which conforms the data and in some cases puts data in 3NF where necessary. Finally the data feeds into dwKYLE.

The dbs are not on the same server as the sa and dws but I think it makes it easier to see the flow, and on the OLAP server groups the databases nicely. I do have a dbETL on that server, which stores all the information about the ETL processes. As it has a db prefix, it is a querable OLTP database.


I'll be honest, I'm confused. I mean if it works for you, great. But why not FinanceStaging or Cars (for the readable/OLTP) or KyleDataWarehouse. Those can be the same as what you have, but two things are done, the sorting is by the name of the database, not by type, and it's clear. Very little training is necessary to let people know what each thing does and you don't have to worry about accidently connecting to dwKYLE when you wanted dbKYLE since the second letter gets a little lost in there... Again, not trying to throw rocks or start a fight. I'm just a HUGE fan of clear and simple language in order to reduce friction and overhead so I advocate for it.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
RonKyle
RonKyle
SSCertifiable
SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)

Group: General Forum Members
Points: 6874 Visits: 3620
saFinance is shorter than FinanceStaging and dwKyle is much shorter than KyleDataWarehouse. The users don't see these names, so they don't have to be user friendly. I can see that some might prefer databases be grouped, in which case the suffix would be better, but I like to have my staging areas grouped together, so I need the prefix.

Some would say I'm giving away my Microsoft Access roots, but no apologies for that.



Nemeaux
Nemeaux
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 Visits: 166
I quite agree. Clarity has a lot going for it!
Michael L John
Michael L John
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5901 Visits: 8227
Why is shorter better?????

This is the fight I have had with developers for years. They provide the argument that "ThisIsTheProductionDatabase" is too much typing, so they name it "PD".

Same thing for objects. Actual words usually work best for names. There is never any confusion.

With your prefix "sa", when I look at this, I would expect some sort of DBA utility database.
In the SQL Server world, SA means system administrator, not 'Staging Area".

How many times have you had to provide an answer, verbal or written, as to what these arbitrary and meaningless prefixes mean? Add up that time, and then multiply that by your salary. These poor practices cost an awful lot of money.

Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65755 Visits: 18570
Nemeaux (7/31/2013)
So what do you all think about database names as short as 5 characters in length? Which is a standard that is mandated where I work?


That is NUTS.

I guess the point they are trying to make is obfuscation.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65755 Visits: 18570
Grant Fritchey (8/1/2013)
Clarity, clarity, clarity.

You need to make things clear. Keeping the names arbitrarily short does nothing but obscure meaning. You want to know what things are, quick, clear and simple. In fact, this should be your naming standard for everything. Keep things clear.


I agree. You want to be able to know what the database (or object) represents quickly and not have to look it up in some documentation translator.


I'm also completely against naming databases based on the environment they are in. That makes things EXTREMELY difficult to manage for testing, coding, rollbacks from production, etc.


<sarcasm> I love the databases suffixed with _DEV that end up being the production database. </sarcasm> That takes a bit of getting used to.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search