3 ms·
UUIDs are used as surrogate keys: http://en.wikipedia.org/wiki/Surrogate_key http://en.wikipedia.org/wiki/Surrogate_key
by ExpiredLink 14y ago
UUIDs are used as surrogate keys: http://en.wikipedia.org/wiki/Surrogate_key http://en.wikipedia.org/wiki/Surrogate_key
- parfe 14y agoIn a way that an integer is not?
- ExpiredLink 14y agoI may have misunderstood the question. A UUID is a (very long) integer.
- chris_wot 14y agoInteger values are also used as surrogate values. Use of a natural key, IMO, is bad practice.
- e12e 14y agoWhy do you think natural key(s) (w/index(es) as needed) are bad practice? Data model refactoring?
- chris_wot 14y agoA natural key as a primary key is terrible practice because I've never even once seen a natural key that wasn't tied to business logic. Logic that potentially can change. Don't do it, you only make it worse for yourself if you pick a natural key for a PK!