1

Can I implement symmetricDS in identical databases?

My scenerio

I have to databases:

Database A

Database B

Whatever data change happens in either one of them should reflect in the other:

Current situation:

  1. Even though the DB are identical, database B have less tables that database A
  2. Consider a table tableA from database A and same table in database B But pk id for same records are actually different in two tables
  3. Can i expand and implement symmetricDS if i want to expand to a third database

Currently i am using a mapping table and API to handle datasync. Can i move to symmetricDS for syncing data

Mukund
  • 1,107
  • 2
  • 18
  • 40

1 Answers1

1

Yes, go ahead

SymemtricDs allows for bidirectional synchronization of databases

Only the tables of database B will be configured for synchronization. The extra tables from database A might be added to the mix using table transformation.

As long as there are constraints of uniqueness on columns in, for example, database A that are PKs in database B that will not be a problem.

You can add as many types and instances of those types of databases. Bear in mind that the graph of database relationships must satisfy the definition of a tree.

Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148
  • Thank you for the reply, very much obliged. As a clarification, could you please confirm that, suppose, there is a table called student in DB A and DB B. three fields for the table, Id, name and mark, the consider this record, 1,X,99 in DB A and 2,X,99 in DB B, Both are same records. Suppose an update occurred for DB A table as 1,X,98. Will it be synced with DB B's student table? – Mukund Aug 29 '22 at 12:01
  • In the above scenario I just want to point out the fact that, the only uniqueness constraint for the table student is 'Id'. So being Id the only unique row identifier, will symmetricDS be able to update the corresponding rec in DB B? the 'name','mark' both can be modified – Mukund Aug 29 '22 at 12:11
  • do you want to ask if a configuration could be made to make the record 2,X,99 in DB B get updated to 2,X,98? or, you want to have both 1,X,98 and 2,X,99 in DB B? – Boris Pavlović Aug 29 '22 at 12:31
  • rec in DB B to be updated to 2,X,98 – Mukund Aug 29 '22 at 12:38
  • Is the 2nd column with the value X having a unique constraint? – Boris Pavlović Aug 30 '22 at 06:32
  • only primary keys are there, no unique constraint, for the table, Id, name and mark, where Id being the PK, mark and name can change – Mukund Aug 31 '22 at 07:12
  • if there's more than one row with value X in the second column then there's no way knowing which row to choose at the destination to update the changes in the 3rd column – Boris Pavlović Sep 01 '22 at 08:56