We are building a web platform that incorporates multiple services, each with its own underlying data. These services are being built independently following the principles of Service-Oriented Architecture, but they transact against potentially related data. We are considering whether these services should share one big database or each have their own database. (We are planning to use SQL Server 2008 Enterprise on a Windows 2008 cluster.)
Some of the advantages to each approach we have already considered include:
Single Database
- Relating data from different services can be bound together by foreign key constraints
- Analytic extracts are simpler to write and faster to execute
- In the event of a disaster, restoring the platform to a consistent state is easier
- For data that is referenced by multiple services, data cached by one service is likely to be used soon after by another service
- Administration and monitoring is simpler and cheaper up front
Multiple Databases
- Maintenance work, hardware problems, security breaches and so forth do not necessarily impact the whole platform
- Assuming each database is on separate hardware, scaling up multiple machines yields more performance benefits than scaling up one big one
From an operational perspective, is it more advantageous that each service in this platform get its own database, or that they all go in the same database? What key factors inform an answer to this question?