title: Multi-tenancy with SQL/WCF/Silverlight
body: <p>We're building a Silverlight application which will be offered as SaaS. The end product is a Silverlight client that connects to a WCF service. As the number of clients is potentially large, updating needs to be easy, preferably so that all instances can be updated in one go.</p>
  
  <p>Not having implemented multi tenancy before, I'm looking for opinions on how to achieve</p>
  
  <ul>
  <li>Easy upgrades</li>
  <li>Data security</li>
  <li>Scalability</li>
  </ul>
  
  <p>Three different models to consider are listed on <a href="http://msdn.microsoft.com/en-us/library/aa479086.aspx" rel="nofollow noreferrer">msdn</a></p>
  
  <ol>
  <li>Separate databases. This is not easy to maintain as all schema changes will have to be applied to each customer's database individually. Are there other drawbacks? A pro is data separation and security. This also allows for slight modifications per customer (which might be more hassle than it's worth!)</li>
  <li>Shared Database, Separate Schemas. A TenantID column is added to each table. Ensuring that each customer gets the correct data is potentially dangerous. Easy to maintain and scales well (?).</li>
  <li>Shared Database, Separate Schemas. Similar to the first model, but each customer has its own set of tables in the database. Hard to restore backups for a single customer. Maintainability otherwise similar to model 1 (?).</li>
  </ol>
  
  <p>Any recommendations on articles on the subject? Has anybody explored something similar with a Silverlight SaaS app? What do I need to consider on the client side?</p>