Generate random integers without collisions

I discuss a common requirement, generating random numbers to serve as surrogate keys, and show how you can avoid the incremental cost of preventing collisions.