'Bad idea to duplicate GUIDs when replicating a database?
I have the following scenario and I would like to know if my logic is sound or not.
Lets say I have a master DB that among others contains a people table. I also have several other DBs that contain an exact copy of the master DB people table. The people table needs to be kept synchronized among all DBs. The DBs use GUIDs so when a new person is added to the table a new GUID is assigned to that row.
What should I do when that new person's row in the master DB needs to be synchronized with all the other DBs? I can copy over the data and generate new GUID (default behavior in the software I'm using) or I can copy the data AND the GUID.
I've though about this and I feel copying the GUID is the best solution. The main reasoning behind this is that I might not have a way to uniquely identify each person (please don't ask why) so when there is an update to a row I'm not sure I can look up the matching row in each DB and sync the changes. However if I copy the GUID, I can simply look for that GUID in each table and know that is the matching row.
I don't see any downsides to using the same GUID in what is essentially a replicated table. Of course I understand using the same GUID for different data would be a bad idea (and I don't see why you'd want to do that).
Does my idea make sense?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
