in reply to Data indexing in BerkeleyDB hashes

If the URLs are unique, you can use them. If not, you need something else. Incidentally, you don't have to escape the URLs because any character that is valid in a URL will be valid as a BerkeleyDB key.