database design - Does foreign key constraints for sql azure federations need tenantid in the actual constraint? -
i understand tenantid
needs in tables want federate on in sql azure federations. need alter foreign key constraint have tenantid
+ actualprimarykey
? or can maintain actualprimarykey
field in actual foreign key constraint?
i read "in add-on that, table contains foreign key constraint, references federated table, need tenantid
added , become federated table. example, imagine if had orders table, decided create federated table" on blog post.
as far know, yes, have to.
in federated table, federation column must primary key, or part of primary key. i.e. if have orderid primary key , if need federated table tenantid, new primary key must orderid + tenantid
if have orderdetail table related order, foreign key orderid must changed orderid + tenantid well, since need orderid + tenantid identify record in order table.
database-design azure foreign-keys sql-azure federation
No comments:
Post a Comment