3 ms·
We deal with a lot of crap where a certain business entity has several different biz keys that can reasonably be used to uniquely identify the thing. I would c
by bob1029 5y ago
We deal with a lot of crap where a certain business entity has several different biz keys that can reasonably be used to uniquely identify the thing.
I would concur with adding a synthetic primary key, and maintaining all of the relevant business/domain keys on the same type.
The advantage of this approach is that you can still keep 100% correct relations between your internal types, even if the domain keying scheme is fucked up or otherwise broken per your original assumptions. It's really easy to add a new column to refine the additional domain keys. Fixing a bad PK and all the things that talk to it is much harder.