Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Schemas vs Several Databases


Schemas vs Several Databases

Author
Message
Paul Hernández
Paul Hernández
SSC-Enthusiastic
SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)

Group: General Forum Members
Points: 173 Visits: 654
Hi Folks,

I would like to discuss the following design issue:
I'm working in a Project in which several systems are involved, like SAS Marketing Automation and Microsoft Dynamics 2011. There is a database to hold the marketing campaigns information, other to stores the CRM data and a Data Hub to store and exchange general data across the systems.
At the beginning I created a database (The Data Hub) to store the data coming from an external provider. The other systems have their own databases and also read data stored in the Data Hub. Then I created new schemas in the Data Hub to stored relevant data from the other systems, like marketing lists, campaigns and so own.
Now I have to load data into the CRM, so I created a separated Staging DB to prepare the data before load them in the CRM database.
My new requirements are twofold:
- Store changes made in the CRM by the operators back in the Data Hub.
- Send the current data to the external provider.
My first try was to build new schemas to manage the permissions and so on, but I don´t know exactly which strategy should I follow.
Why is your opinion about this issue?
I know I should consider another factors like maintenance, backups, security, server size, etc.
Any comment would be appreciated.

Paul Hernández
Big_Brother80
Big_Brother80
SSC-Enthusiastic
SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)

Group: General Forum Members
Points: 136 Visits: 159
In my environment there is a support fee for each database, so this combination of database using schemas to separate them is a huge cost saving for the applications.

It also reduces the number of databases in our clustered instances.
Paul Hernández
Paul Hernández
SSC-Enthusiastic
SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)SSC-Enthusiastic (173 reputation)

Group: General Forum Members
Points: 173 Visits: 654
Hi Big Bro!
Thanks for your comment.

I found many good reasons for using schemas as logical containers like the ability to manipulate objects independently of users, and the reduce of administrative complexity, while the objects still work together where requiered.

I recommend this article to better clarify this topic: Importance of Database Schemas in SQL Server

The only significant problem that I've found at the moment is the size of the database file, but with a partioning strategy this issue could be overcome.

Kinde Regards,

Paul Hernández
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10777 Visits: 12019
I guess that what you apparently want to use schemas for is what MS intended to provide by providing complete separation between the schema concept and the user concept. So yes, it's reasonable to use them that way.

However, there can be issues which may persuade to keep some schemas in separate databases. Putting data for which the full recovery model, frequent incremental backups and fairly frequent full backups is appropriate and data for which the simple recovery model and infrequent backups is appropriate into schmata in the same database is going to use extra storage (for unneccessary backups, unwanted data in log files), slow down recovery on service startup for data for which simple recovery is appropriate, probably introduce complications in administration as a result of attempts to alleviate the increase in storage requirements, and certainly increase teh performance load of backups and of logging. So, as usual, what's best for you depends on your data and what you are doing with it.

Tom

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