Is Oracle claiming that md5 will generate a unique id? I hope not since
it's not true.
MD5 (Message Digest 5) is a hash algorthm, much like a CRC, or any other
checksum. It can not guarentee that the number generated is a unique value,
only that it is the hash associated with the object that the checksum is
generated on. But it is entirely possible that the same hash value can be
generated from a different string.
There are many such hashes. While md5 was in use and popular for quite some
time, it has been proven to have some weaknesses and has been somewhat
replaced by the sha-1 algorthm.
If you want, you can get a whole bunch of encryption and hash routines from
www.opensssl.org, including md5, md2, sha1, etc. These routines can then
be implemented in your client code, or in the server as a fenced routine.
My personal thought is that encryption and hashing is best done in the
client code rather than in the server because of the overhead associated
with either encryption or hashing. If I have 1000 client programs attached
to a single server, I'd rather the server spend it's time getting data to me
and then have each of the 1000 client programs responsible for any hash
logic.
BTW - I'm not a java programmer, but I think that java has both md5 and
sha-1 included in the builtin security package.
M.P.
<Mamuninfo@gmail.com> wrote in message
news:1129440764.987111.9070@o13g2000cwo.googlegrou ps.com...[color=blue]
> Hello,
> Have any function in the DB2 database that can generate unique id
> for each string like oracle, mysql,sybase,sqlserver database.
>
> In mysql:-
> select md5(concat_ws("Row name")) from tablename;
>
> Here this function generate unique id for each row of the table.
>
> Regards..
> ..Mamun
>[/color]