May 22, 2014 at 4:44 pm
Hello Experts,
We are extracting data from multiple sources and staging the data in SQL Server tables. Once, the data is staged, we are doing some manipulations/calculations and create another set of tables which feed the SSRS reports. We would like to differentiate these staging tables and report tables using naming convention.
What is the best practice to name the tables in this scenario? Using Prefix or Suffix?
Example 1 (using Prefix):
RPT_TableName
STG_TableName
(OR)
Example 2 (using Suffix):
TableName_RPT
TableName_STG
Thanks inadvance.
May 22, 2014 at 5:51 pm
Learning1 (5/22/2014)
Hello Experts,We are extracting data from multiple sources and staging the data in SQL Server tables. Once, the data is staged, we are doing some manipulations/calculations and create another set of tables which feed the SSRS reports. We would like to differentiate these staging tables and report tables using naming convention.
What is the best practice to name the tables in this scenario? Using Prefix or Suffix?
Example 1 (using Prefix):
RPT_TableName
STG_TableName
(OR)
Example 2 (using Suffix):
TableName_RPT
TableName_STG
Thanks inadvance.
I lean towards the second method just so that it's apparent that both tables exist when looking at the Object Explorer but, "It Depends". If it's necessary to quickly find things by operational area, the first method may be better.
Whichever method you and the folks you work with settle on, remember that consistency will become a major key.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2014 at 5:59 pm
I'll throw another alternative out there for you.
You could employ schemas to help group/separate these tables via functional areas.
So you could see something like
Reporting.SomeTable
Staging.SomeTable
If you are concerned about finding an object or ensuring it exists in the different schemas, a filter in SSMS is easy enough to use. Or you could query sys.objects to find it.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 23, 2014 at 7:52 am
I'd also suggest going with the schema.
Or, if you have to name the tables, I'd go with naming them MyTableStaging or something like that instead of using old school Hungarian notation. We have plenty of room for naming objects, so we may as well name them using clear language.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 23, 2014 at 7:55 am
Grant Fritchey (5/23/2014)
I'd also suggest going with the schema.Or, if you have to name the tables, I'd go with naming them MyTableStaging or something like that instead of using old school Hungarian notation. We have plenty of room for naming objects, so we may as well name them using clear language.
Totally agree. Nothing like a shortened name that could represent something different than what you'd think. Prevent the confusion by clear naming.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 23, 2014 at 9:51 am
Thank you all for your suggestions. We are using Schemas for another different reason. We will go with the "TableNameStaging" convention.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply