Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

Database Naming Convention Expand / Collapse
Author
Message
Posted Thursday, August 1, 2013 6:53 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 18, 2014 2:47 PM
Points: 814, Visits: 2,008
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.



Post #1479922
Posted Thursday, August 1, 2013 6:57 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:34 PM
Points: 15,623, Visits: 28,007
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1479926
Posted Thursday, August 1, 2013 6:59 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:34 PM
Points: 15,623, Visits: 28,007
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1479928
Posted Thursday, August 1, 2013 7:13 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 18, 2014 2:47 PM
Points: 814, Visits: 2,008
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.



Post #1479933
Posted Thursday, August 1, 2013 8:27 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:34 PM
Points: 15,623, Visits: 28,007
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1479967
Posted Thursday, August 1, 2013 8:44 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 18, 2014 2:47 PM
Points: 814, Visits: 2,008
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.



Post #1479980
Posted Thursday, August 1, 2013 9:44 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 11, 2014 9:35 AM
Points: 9, Visits: 144
I quite agree. Clarity has a lot going for it!
Post #1480001
Posted Thursday, August 1, 2013 9:56 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 12:24 PM
Points: 941, Visits: 2,943
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
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Post #1480009
Posted Thursday, August 1, 2013 10:03 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 10:59 AM
Points: 21,619, Visits: 15,275
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1480015
Posted Thursday, August 1, 2013 10:07 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 10:59 AM
Points: 21,619, Visits: 15,275
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1480018
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse