Thanks for your post.

There’s no real thing called “secondary primary key” — it’s just something I made up :-)

What I meant is that you would have a column having the same semantics as a primary key (unique, immutable, not null, indexed, etc.) but having the UUID value rather than the sequential integer value. It’s secondary in that it is not used as the foreign key in related tables within the database, but that it could be if needed. And in cases where an external consumer, perhaps another service, needed a unique reference this one would be preferred. (This quality, of being unique across multiple databases having the same schema is my use-case, but made me think about the broader question).

Hope this clarifies.

Show your support

Clapping shows how much you appreciated Tom Harrison Jr’s story.