RE: dbms_HASH...or something like it?...comparing data...

  • From: "Marquez, Chris" <CMarquez@xxxxxxxx>
  • To: <jonathan@xxxxxxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 22 Jan 2005 21:56:10 -0500


Thanks, perfect.
Now that *you* say it sounds familiar,
but I find I have not personal notes=20
on dbms_utility.get_hash_value.

>>two items that hash to the same value do
>>not necessarily hold the same original value.

Good info...this may be a show stopper.

Chris Marquez
Oracle DBA
HEYMONitor=99 -
"Oracle Monitoring & Alerting Solution"

-----Original Message-----
From:   oracle-l-bounce@xxxxxxxxxxxxx on behalf of Jonathan Lewis
Sent:   Sat 1/22/2005 6:13 PM
To:     oracle-l@xxxxxxxxxxxxx
Subject:        Re: dbms_HASH...or something like it?...comparing data...

You could have a look at procedure
described in dbmsutil.sql

This turns an input string into a number.

Make sure your developer is aware that
two items that hash to the same value do
not necessarily hold the same original value.


Jonathan Lewis
The Co-operative Oracle Users' FAQ
Public Appearances - schedule updated Dec 23rd 2004

----- Original Message -----=20
From: "Marquez, Chris" <CMarquez@xxxxxxxx>
To: <oracle-l@xxxxxxxxxxxxx>
Sent: Saturday, January 22, 2005 11:03 PM
Subject: dbms_HASH...or something like it?...comparing data...

Need some help.

Developer has a wide table...20 columns.
He would like to add a 21st column to the table.
Then he would like to (be able to) store the first=3D20
20 columns data in concatenated form in the 21st column.
For example;
col1, col2, col3

No problem PL/SQL program can handle this, BUT
he would rather store the 20 concatenated columns in=3D20
a simpler, tighter form. He suggested "hashing" the=3D20
20 concatenated columns to (I guess) an Alphanumeric string?

And given that this is possible, what would be the=3D20
best/required data type for the hashed data?

Why you ask?
Because he want to be able to compare rows=3D20
(against new data) simply and quickly without selecting and=3D20
concatenating all 20 originally columns.

So he would store the hashed version of a row (data) on Insert.
Then on Update using a function hash the update data  and compare
it to the  already hashed value in the row.
Any help is appreciated?
Any other solution is appreciated, BUT his program is limited and=3D20
can only S,I,U,D and call PROCEDURES or FUNCTIONS.

Please reply directly to me as well as to the list.

Thanks in advance,

Chris Marquez
Oracle DBA
HEYMONitor(tm) -
"Oracle Monitoring & Alerting Solution"




Other related posts: