What's your opinion on using UUIDs as database row identifiers, particularly in web apps?

后端 未结 15 2150
深忆病人
深忆病人 2020-12-12 12:43

I\'ve always preferred to use long integers as primary keys in databases, for simplicity and (assumed) speed. But when using a REST or Rails-like URL scheme for object insta

15条回答
  •  一向
    一向 (楼主)
    2020-12-12 13:32

    Rather than URLs like this:

    http://example.com/user/783
    

    Why not have:

    http://example.com/user/yukondude
    

    Which is friendlier to humans and doesn't leak that tiny bit of information?

提交回复
热议问题