My objective is to have a non-sequential unique key for each record in
a table. The key would be 5-digits long, comprised of letters and
The reason for this is to have a more user-friendly key for users to
write down than the auto-increment key. Is there an algorithm to "map"
the auto-increment field to a non-sequential unique key that will not
Or should I just generate a random 5-digit key, see if it already
exists in table, and repeat until a unique key is found?