Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bambax
· 5mo ago · 0 comments
Why would you use UUIDs a primary keys? Let SQLite use rowids internally (which is automatic and invisible), and have a different (indexed) column with UUID if you need that for publishing the ID somewhere.
Comments
[–]
elcomet
5mo ago
UUID as key is useful when you have a distributed system where multiple workers create items independently
[–]
victorbjorklund
5mo ago
Because another app can then create the id and add it to the db later.