4 ms·
Their uniqueness of course. > To be able to generate keys independently of the database > To move sets of related records between different databases wi
by ceeam 3y ago
Their uniqueness of course.
> To be able to generate keys independently of the database
> To move sets of related records between different databases without having to deal with renumbering everything
- jandrewrogers 3y agoUnfortunately, UUIDs aren't as universally unique in practice as people think. The standard flavors are banned in quite a few organizations that care a lot about data integrity for valid reasons. Standard UUIDs work for some applications but definitely not all. For most applications you are better off using a sensible structured key, like incrementing an integer or similar, and encrypting it if you want to obscure it. Encrypting a 128-bit value is approximately free on modern CPUs.
- yes_man 3y agoAnd adding greppability of logs in debugging situations. You can just search logs in any systems of yours with the UUID and find exact hits you are dealing with. Whereas with integers you will get all kinds of hits
- phkahler 3y agoBecause UUIDs are universally Unique IDentifiers.