诉讼可能涉及多个当事方,其中每一方都扮演特定的角色并提出相关的索赔。由于声明域和诉讼域密切相关,因此除了标识符之外,我们还将在声明域中嵌入字段。这样,我们就可以在进行诉讼时获得索赔详细信息的快照,因此即使索赔详细信息发生变化,我们也不会丢失与诉讼相关的原始索赔数据。
诉讼域包括以下关键实体:
诉讼:索赔诉讼
诉讼方角色:链接以下实体的关联实体:
保险对象方角色:链接以下实体的关联实体:
诉讼和当事方之间的关系通过 litigation_party_role 表来促进,我们将使用嵌入式大量在MongoDB中表示该表。
单击 Mappings from relational tables 旁边的 Add。单击 Embedded array,然后从 Source table 下拉菜单中选择 litigation_party_role。
在 All fields 复选框下,取消选中 litigationIdentifier字段,然后单击 Save and close。
在 Mappings from relational tables 旁边,单击 Add 并选择 Embedded documents。从 Source table 下拉菜单中选择 claim。
单击 Save and close(连接)。
在 Mappings from relational tables 旁边,单击 Add 并选择 Embedded documents。从 Source table 下拉菜单中选择 insurable_object。确保将 Root path 前缀设立为 litigationPartyRoles.claim。
单击 Save and close(连接)。
在 Mappings from relational tables 旁边,单击 Add 并选择 Embedded array。从 Source table 下拉菜单中选择 insurable_object_party_role。确保将 Root path 前缀设立为 litigationPartyRoles.claim.insurableObjects。
单击 Save and close(连接)。
将所有必要的表映射到 litigation文档后,您就可以从Relational Migrator的MongoDB视图中删除以下集合:
agreementPartyRole
litigationPartyRole
insurableObject
insurableObjectPartyRole
locationAddress
insurableObjectParty
您已在五个集合中对整个关系模式进行了建模:
party
partyRole
policy
claim
litigation
现在您已完成模型,需要将数据迁移到MongoDB实例。