1

我正在尝试 SymmetricDS 并且在这方面非常新。我有两个问题:

主客户端节点 1 (location_id = 001) 客户端节点 2 (location_id = 002)

我有的表结构: tbl_customer (customer_id, first_name, last_name) tbl_customer_details (customer_id, location_id, details)

1) 当主节点同步到客户端节点时,如何同步 tbl_customer 数据在某个 location_id 中?正如您从我们的结构中看到的那样,在 SQL 中,我们必须将 tbl_customer 连接到 customer_id 上的 tbl_customer_details where location_id = X 我如何告诉 SymmetricDS 相应地同步以及如何使用位置 ID 指定每个客户端节点?

2)是否可以从客户端节点上的视图同步到主节点上的表,或者只能从表到表?

4

1 回答 1

1

1)使用sym_router表的列router_type与值subselect,然后在列中为两者router_expression编写一个 SQL 片段和。c.external_id in (SELECT_STATEMENT_RETURNING_LOCATION_IDS)tbl_customertbl_customer_details

2) 如果数据库实现允许为视图定义触发器并且SymmetricDS 支持它,那么是的,这是可能的。

于 2015-03-26T12:40:17.293 回答