Hacker News new | ask | show | jobs
by gigatexal 241 days ago
In a well normalized setup idk maybe not. Uuidv4 for your external ids and then have a mapping table to correspond that to something you’d use internally. Then you can torch an exposed uuid update the mapping table and generate a new one and none of your pointers and foreign keys need to change internally.
2 comments

The point is, that mapping table incurs the same indexing cost that was trying to be eliminated in the first place. Normalization is irrelevant.
I wonder if there is a name for such a mapping table in RDBMS-land...?
We call them lookup or mapping tables.
I was thinking something a bit snappier and bit shorter... maybe an Index? Maybe it could be even maintained automatically by the database...