3 ms·
I almost always use surrogate keys as primary keys (or a tuple of them, for join-tables). Natural keys are rarely as immutable and unique as we'd like. Even IS
by CodesInChaos 2y ago
I almost always use surrogate keys as primary keys (or a tuple of them, for join-tables). Natural keys are rarely as immutable and unique as we'd like.
Even ISO country codes can be problematic, for example we currently use XK for Kosovo, but it might get an official code at some point.