Reputation: 7581
I am running multiple websites and have noticed that many of the tables they rely on are standard stuff that ideally should be centralised:
When one updates, I am having to update it in all the databases for each of the sites which is getting tedious and causing oversights. I originally designed it this way because I thought if I made a shared database it would be a single point of failure. If the shared database was to ever go down, then all my sites would suffer.
Is there a better way of doing this or do I have just have to accept the risk of single-point-of-failure and put it robust disaster recovery procedures to mitigate it?
I am using SQL Server 2014 Enterprise.
Upvotes: 2
Views: 2600
Reputation: 1967
Why not create Database as a service, meaning not exposing Database directly to Client but exposing it via a REST Interface.
In this way you can handle fault tolerance requirements of an application in a better way and then also have better recovery mechanisms on top of it.
Hope this helps.
Upvotes: 1
Reputation: 431
It comes down to balancing risks, costs and benefits - which of your problems is more likely to happen, and how bad would things be if it did?
How often does an update to the reference data not get applied to everywhere? How bad is it when this happens? Is it as bad if an update will get applied everywhere, but only eventually rather than immediately? And so on.
Compare that to: How often do databases crash? How bad is it if that happens? And so on.
How important is it that the system is simple? Is it already hard to manage? If so, is it the code or the database that's the harder bit?
There are several options I can think of; which is best will depend on your circumstances. The circumstances include what technology you already have skills in, what your technology strategy is etc.
Upvotes: 1
Reputation: 389
1] If your all 04 website is having static data, then you should go for single database.Here database DML(Data Manipulation Language) operation should be minimum and not often.Though website performance will be little low, but it is trade-off between performance v/s database maintenance.
2] If your all 04 website is having OLTP(online transaction processing) like e-Commerce application, then you should keep all four database separate.
Keep disaster recovery for any of above case you choose
Upvotes: 1