-
I am trying to get my head around the Filtering. Here is my explanation: We have a main Master DB with all client data with different site codes. Due to the huge size of the Master DB, we are planning to split it into smaller DB's based on the Site code. In the end, the users will only be able to add/update/delete data from the Site DBs and then the data will be synced back to the master DB. I have managed to filter them out to the different small DB's but I am not sure how to sync all the Site DBs data back to the Master DB.
Now if a user creates a new client in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
That's an easy one: |
Beta Was this translation helpful? Give feedback.
-
As @gentledepp mentioned, working with GUID is the most convenient way. Another technic is to use seeding. You have two main methods: Method 1:The idea is to work with Identity columns as Primary keys and range of ids.
You can store these values in any configuration table. Method 2:In the same concept, another technic is to use the IDENTITY (m, n) formula as follows:
For example, we have 4 nodes (n = 4) to sync (1 Server + 3 Clients). The Serial number m will be 1 for Serve and 2, 3, 4 for Client – A, Client – B and Client – C respectively. According to the formula, the data will be populated as follows:
The downside of this method is that you need to now the MAX number of clients you will have in your organization. LinksSome useful links: |
Beta Was this translation helpful? Give feedback.
As @gentledepp mentioned, working with GUID is the most convenient way.
Another technic is to use seeding. You have two main methods:
Method 1:
The idea is to work with Identity columns as Primary keys and range of ids.
For instance, you can define something like that:
You can store these values in any configuration table.
When you reach the limit for one client (or server), just change the range for a new one.
Method 2:
In the same concept, another technic is to use the IDENTITY (m, n) formula as follows: