You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in the gitbook, Returning response with uuid is a better practice. But backend developer usually use database to store data.As we know,It is not recommended to use uuid in the database,So how to solve the problem or haveing good suggestion.
The text was updated successfully, but these errors were encountered:
It may indeed be worthwhile to amend this one slightly, even if only to make it clear that it's certainly not a slam dunk to use UUIDs.
The way I see it, UUID advantages:
Operational errors, even across different tables/resources, are incredibly difficult to do by accident. Two different resources in two different tables might share the ID 23, but when it comes to UUIDs, no entity shares an ID with anything else in the database. This has legitimately saved me a couple times as I've run an UPDATE against the wrong table (again, accidentally).
Scales well beyond a single master database.
Sequence/serial advantages:
Much improved data locality in that new data will land in the same nodes in the B-tree/pages on disk. If you have a table with a lot of INSERTs happening, sequences will be far more performant I/O-wise.
More human friendly in that it's easy to copy or remember a comparatively short integer ID compared to a UUID.
As mentioned in the gitbook, Returning response with uuid is a better practice. But backend developer usually use database to store data.As we know,It is not recommended to use uuid in the database,So how to solve the problem or haveing good suggestion.
The text was updated successfully, but these errors were encountered: