I want to store url's as unique in a mysql database table but with string type varchar and text the length of a 1000 is too long. Lengths of Search engine friendly url's can be typically long,whats an acceptable length?
+1
A:
Well if you want to cover yourself, 2000 characters, according to this question
Tim Joseph
2010-09-20 23:47:06
+1
A:
There really is no length that will guarantee unique- if you want to make sure a string of a given length is unique, you need to take a hash of the string and compare it, MD5 and SHA1 are common algoritms people use.
James Connell
2010-09-20 23:48:00
Which is obviously still not an absolute guarantee of uniqueness.
Adam Robinson
2010-09-21 00:08:34
Not sure what you mean, an MD5 hash of a string is unique for all practical purposes
James Connell
2010-09-21 16:15:34