拆分合并工具和外键约束 [英] split-merge tool and foreign key constraints
问题描述
我跟着部分(参见:参考完整性),下面的文档中,PK-FK关系仍然在参考文献中表,直到复制操作完成到分片并且表为空。 split-merg工具还应创建
分片映射数据库实例来管理所有关系。如果该表不是初始分片设置的一部分,则需要添加该表。
将分片地图修改为向外扩展: 修改分片图
因此,拆分合并工具应该在初始设置时处理所有事情。
是不是正常工作?
I followed the
split-merge tutorial but after completion I was still wondering how you need to handle foreign key constraints.
In the picture above you have two Shard tables - MyShardedTable and MyShardedReferringTable - and one table without a Shard key but it has a foreign key to MyShardedReferringTable).
How should I handle such a case with the split-merge tool?
Is it possible to register the ShardedForeignKey table in the SchemaInfoCollection somehow? Or do I need to add the shard key to this table as well?
Hi Thomas,
In the copy and key features section (see: Referential Integrity) of the below document, the PK-FK relationships remain on the reference tables until the copy operation is completed to the shards and the table is empty. The split-merg tool should also create a shard map database instance to manage all the relationships going forward. If the table wasn't part of the initial shard set-up it will need to be added.
Moving data between scaled-out cloud databases
To modify the shard map to scale-out: Modifying a shard map
So, the split-merge tool should have taken care of everything upon initial set up.
Is something not working correctly?
这篇关于拆分合并工具和外键约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!