2 ms·
> In what context would a primary key change, even when sharding? When the model underlying the data is significantly incorrect, and needs to change. I.e., the
by deathanatos 9y ago
> In what context would a primary key change, even when sharding?
When the model underlying the data is significantly incorrect, and needs to change. I.e., the relation you modeled does not map to the real-world concept like you thought it did. (Or, it did, but no longer does.)
I feel like this most often happens when two concepts end up being modeled by a singular table. You find out later that the table really represents separate, distinct things, and needs splitting. The split off things can — depending on how you do PKs / your migration — get new PKs.