tags:

views:

36

answers:

2

I have a SQL Server with a number of databases. Most are for applications, but some store data for reporting and analysis. I also have information that is not specific to any one database, but can be used by several of them.

A good example is my company's fiscal calendar. I store this information in a table. Putting the same fiscal calendar table in each database is a bad idea for me. Even with the negative of having multiple database dependencies, I think it is worth it because otherwise there is too much risk for inconsistency. What I do now is put the fiscal calendar and other similar functions and procedures in a database simply titled "Community".

I have the rare and glorious opportunity of moving to a new server and refactoring everything as I go. I am wondering if I should change this practice. Below are a few specific questions:

  • Am I unaware of any disadvantages of my current method?
  • Is there a better place or name to use to store this type of information?
  • What is your experience with issues like this, and am I missing what should be an obvious solution?

Thanks

+3  A: 

You've already taken the important step of separating the shared data into its own database. I don't think there's a better approach. The name is fairly subjective, but Common is another term frequently used for this purpose.

ElectricDialect
Thanks for the tip about Common. Advice like this is important to me because if we bring in someone else to work on the database, I would rather everything look as, let's just say normal, as possible for reasons of productivity.
K Richard
+1  A: 

I would hide this behind a "shared data service" or something. Not rely on the existence of a database.

You don't have to be a big shop before you need to put one app onto it's own servers then you're bollixed.

At the very least, I'd use a linked server to hide it even if on the same server so you are independent of actual server names.

gbn
Can you please elaborate on techniques of creating such a service?
K Richard
Just a bog standard web service: nothing fancy.
gbn
I am afraid this is going to be beyond my level of expertise. I understand web services to a limited extent, but how I would use them in SQL Server is completely unknown. I probably require more information that reasonable to provide here, but if you could point me to a site that may put me on the path, I would appreciate it.Thanks
K Richard
Using a web service for this strikes me as a classic case of YAGNI (You aren't gonna need it). A standard SQL Server connection string referring to the database will allow easy configuration of the specific server it resides on.
ElectricDialect
@ElectricDialect: perhaps, it depends how you access it. Do you rely on the Common.dbo.HolidayCalender in your "main" user DB or not. Or why would code your common data via direct db access but your user db via a 3 layer app? YAGNI indeed, as long as all your clients are MS Access...
gbn