We currently have a system where each client gets their own database when they sign-up. Not surprisingly this is getting out of hand.
We are preparing merge all these databases together to a single db. In order to do this we need to note which organization the row belongs. How best is this handled on the database and what pros/cons (Speed, Maintainability, etc) are there to the methods below?
Option 1: Make the Organizatio nId to all tables and make it part of the primary key (making all keys composite).
Option 2: Add Organization Id to all tables as a column with a Foreign Key to the Organization Table.
Option 3: Something else.
We are looking at moving to NHibernate with this move, if that has an effect on what is done.