I've done some searches for "id mapping" and "external id mapping" and I can't find anything meaningful on the site or google, so, here's my question/scenario.
I'm developing an application which will match some records from our internal system with the "same" records from an external (outside the company) system. The data-exchange (receive the data from external system) is irrelevant (could be TXT, CSV, XML, Excel, etc...).
At some point I'll have to match our internal customer id with the external customer id. The thing is: I know my id is immutable, but I don't know id the external id is mutable. And there's no way to know, because the external system is out of my control and can be changed without my knowledge anytime.
So I have 2 scenarios:
- Best case: the external ID is immutable;
- Worst case: the external ID is mutable (within the constraints below);
So I'm developing a mapping table with the following attributes:
- Internal System Customer ID;
- External System Customer ID;
Pretty standard stuff.
The real question is: What should I add on this table in order to prepare for worst-case scenario ?
Constraints:
- If the ID is mutable, it'll be on a daily basis, so there can't be a 1-to-many internal-to-external ID on the same day (this is a business rule that can be enforced);
- The external ID can be anything from an integer to a GUID or a zip-code. But nothing bigger than a GUID;