0

I am designing the primary key for storing product. I look around to find some insight how to design the ID as using auto increment is too boring. Do any one know that the code 'KB46279860I' on the below banknote meaning?

100 USD picture

I think that code is not just using auto-increment but some algorithm like check digit,etc.

Could any one give me some hints , Thanks!!

Sacbmcpd Samuel
  • 105
  • 2
  • 7

1 Answers1

0

If you're not planning on showing the user your ID then auto-increment could save you processing time as it is handled by your database directly.

If you are planning on showing the ID to the user without showing the one in the database, you could consider using Hashids, or GUID or generating your own unique random value with a check digit. You can use Luhn or Damm's algorithm for check digit.

Bond
  • 184
  • 2
  • 9