I would say that your choice depends. You really have three choices:
One database to rule them all...(Your choice 1)
Certainly adding a TenantId
column makes it easier to add new tenants (users) but there are some downsides:
- You must be careful to ensure that every query filters against TenantId. It will be very easy to accidentally forget the TenantId in the right place and return other tenant's data.
- All top-level, parent tables must include a TenantId. It is not just your main data, but all tenant-specific parent data.
- Tenants cannot be on different schema versions at different times. For example, suppose you make some data schema changes in version 1.1 of your application. If all tenants are in the same database, everyone must be updated simultaneously whether you want them to or not. In addition, if you are using a single database, you are almost compelled to use a single site as you want to ensure that the site and schema stay in sync. If you do this, you cannot, for example, charge someone to upgrade in order to get a new feature. The features must be built as plug-ins as opposed to version specific updates which may not be a bad thing but it has to be a conscious decision from the outset.
- It can be a chore to separate tenant's data should they wish to have a copy of their data or wish to host their own data or if you wish to move them to another database server. Because all resources are shared, you may run into a situation where one tenant is chewing up resources through reports or traffic such that you want to move them to their own database server (and up-sell them this benefit). In addition, I've run into situations where tenants want a copy of their data that they can download themselves. If all data is in a single database, this can be a chore.
If you are going to be selling to corporate customers then I would not go down this path. However, if you plan on adding thousands upon thousands of end users as tenants where you do not need to provide them with their data, then using a single database is probably the right approach.
Segment tenants by schema (e.g. Tenant1.Table1, Tenant1.Table2...Tenant2.Table1, Tenant2.Table2...) (I believe your choice 2)
IMO, this is a harder version of simply using separate databases. It has the advantage that maintenance of the one database is a little easier but beyond that has all the same problems as using separate databases.
Segment tenant per database
For corporate customers, I've found that in the end this turns out to be the simplest. It eliminates the possibility of tenant's seeing the wrong data (unless the connection string is wrong). It allows for corporations to host their own system. It allows for tenants to be on different versions if you have different virtual applications per tenant. It makes it easy to do resource allocation, backups and restores. It's only (but not insignificant) downside is the time cost of setup (and thus financial cost). It can be a pain to add databases when you get a new client. Technically, it could be automated but it is still a pain.
So, in the end it depends on your target customer. If they are standard users, then I would go with the "One database to rule them all" approach and make sure you do lots of code reviews and automated testing. If they are corporate customers, especially large corporate customers, then I would consider separate databases per tenant.