Simone
Simone

Reputation: 253

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

Why is better to use an UUID to store unique id values? What are the benefits?

Upvotes: 11

Views: 2115

Answers (1)

zgirod
zgirod

Reputation: 4379

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.

Upvotes: 11

Related Questions