MD5 and the probability of collisions...
November 7, 2006 1:28 AM Subscribe
MD5 and the probability of collisions...
I have a database in which the key is a string of variable length (basically user agent strings of anything between 20 and 200+ characters). I really don't like this idea.
I was wondering about changing it so that it stores the md5 hash of this string, but I'm worried that I'm going to end up with collisions.
What is the chance that two records from my 10,000 record strong database will have the same md5?
Is there a better way of doing this?
posted by twine42 to computers & internet (17 answers total)
However, the correct way to do this is simply add a new integer column to the table, and use that as the primary key.
posted by Leon at 2:01 AM on November 7, 2006