logoalt Hacker News

Ukvlast Monday at 5:40 PM1 replyview on HN

UUIDs are good for creating entries concurrently where coordinating between distributed systems may be difficult.

May also be that you don't want to leak information like how many orders are being made, as could be inferred from a `/fetch_order?id=123` API with sequential IDs.

Sequential primary keys are still commonly used though - it's a scenario-dependant trade-off.


Replies

mkleczeklast Monday at 6:02 PM

If you expose the identifier outside the database, it is no longer "internal".

show 1 reply