Hope some of you might have faced this requirement:- I have desktop based product, which we are planning to take it to cloud. We will be using only one database in SQL-Azure and merging databases of all customers. For merging, we have following options :-
*. Having NewCustomerID and existing TableID as composite primary key.
pros - Easy to export db, as it will be easy to export related tables, with foreign key available as it is in master tables. - Push back from cloud to in-premise db is easily possible
cons - almost every table will have composite primary key and - doubt of having perf issue (after googling, many suggest, tht composite key shud not cause perf issues). EF code first might cause some issue here.
*. Having new auto-increment primary key, and still maintain, NewCustomerID, and OLD TableID key
pros - relationship between tables will be based on single key, and easy to write queries and EF code first relationships.
cons - one extra key and maintainence of old key
Please suggest your choice or if you fond altogether new way to deal with such scenario in sql azure