3 ms·
> I once made the mistake of using an external ID as a primary key. What a day it was when they were changed on me. I've kept with this advice for the most par
by naasking 2y ago
> I once made the mistake of using an external ID as a primary key. What a day it was when they were changed on me.
I've kept with this advice for the most part, but I'm tempted in some cases to use the external id when there's some guarantee of stability and universality. Like 2 and 3 digit ISO country codes.
- Piskvorrr 2y agoNot that I'd get about 5 different ISO country code changes (with some flipflopping) just by sitting in this very same spot for a couple of decades. "Stability" in country codes, bah humbug.
- naasking 2y agoYour geographical location's sorting into a country might not be stable, but I'm referring to the ISO codes that name the country, which should be relatively stable.
- Piskvorrr 2y agoISO 3166-2:XK - self-assigned, in use, but I wouldn't go as far as calling it "stable." I mean, it's been in an explicitly declared unstable state ("about to be assigned an official code") for over a decade.