Hi @EnenDaveyBoy,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
As I understand, you are looking for advice on building a multi-tenant CMS with SQL databases, which can be challenging, especially when balancing cost, security, and scalability.
Here are some considerations and recommendations:
1.Database Per Tenant vs. Shared Database
- Database Per Tenant: This model provides strong isolation, as each tenant’s data is stored in a separate database. This can simplify security and compliance but may lead to higher costs and management complexity, especially if you have many tenants.
- Shared Database with Tenant Isolation: This model stores multiple tenants’ data in the same database but uses mechanisms like Row-Level Security (RLS) to ensure data isolation. This can be more cost-effective and easier to manage but requires careful design to ensure security and performance.
2.SQL Elastic Pools
- Elastic Pools: These allow you to share resources among multiple databases, which can help manage costs and provide performance elasticity1. However, as you mentioned, they might not offer the same fluidity as Cosmos DB.
3.Security and Resource Management
- Row-Level Security (RLS): This feature in SQL Server can help ensure that each tenant can only access their own data, even when using a shared database.
- Always Encrypted: This feature can help protect sensitive data by encrypting it both at rest and in transit.
Recommendations
- Start with a Shared Database Model: Use a shared database with RLS for tenant isolation. This approach can help manage costs and simplify management while ensuring data security.
- Monitor and Scale: Regularly monitor database performance and usage. If certain tenants require more resources, consider moving them to their own database or using elastic pools to manage resource allocation.
- Use Elastic Pools Judiciously: If you have a mix of high and low usage tenants, elastic pools can help balance the load and optimize costs.
For more information, please refer the documents:
https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/service/sql-database
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.