开发者

Why is better to use an UUID to store unique id values?

Why is better to use an UUID to store unique id val开发者_JAVA百科ues? What are the benefits?


Two reasons.

A regular ID is only unique within your table inside of your system. If you ever need to integrate systems there is going to be conflict. UUID is guaranteed to be unique across systems.

A second reason is often you don't want people to know how many records you have in your system. If you have an id with 1,2,3,4,5,6,ect someone can easily figure out how big or small your system is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜