I understand that tenantid
needs to be in all tables that you want to federate on in SQL Azure federations. But do you really need to change the foreign key constraint itself to have tenantid
+ actualPrimaryKey
? Or can you just keep the actualPrimaryKey
as the only field in the actual foreign key constraint?
I read that "In addition to that, any table that contains a foreign key constraint, which references a federated table, will also need TenantId
added and also become a federated table. For example, imagine if we had an Orders table, which we decided to make a federated table" on this blog post.