http://www.perlmonks.org?node_id=869659


in reply to Re: An improved technique for database primary keys
in thread An alternate technique for database primary keys

Sleep well.   It is a calculated-risk, and of course the index in question must be UNIQUE so that colliding values, if they were somehow generated, would not be stored.   You could, of course, go so far as to use Microsoft’s UUIDs (GUIDs).

The notion is simply that, if the string is random and sufficiently long, key collisions in-practice “ain’t never actually gonna happen.”   Your mileage may vary.   Choose appropriately.   If, in whatever context you may be dealing with, this admonition isn’t sound, then don’t follow it.   Peace.