Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: hash value - function

Re: hash value - function

From: ciapecki <ciapecki_at_gmail.com>
Date: Tue, 14 Aug 2007 10:19:41 -0700
Message-ID: <1187111981.033972.315980@j4g2000prf.googlegroups.com>


On 14 Aug., 18:21, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> Comments embedded.
> On Aug 14, 10:54 am, ciapecki <ciape..._at_gmail.com> wrote:
>
> > Hi,
>
> > Is there any function (10g) that would return a kind of hash value,
>
> Which release of 10g?
>
> > I was thinking of getting one value for the whole table.
>
> I'm wondering why you'd think to do that.
>
> > My idea was to concatenate all the columns (5 columns there not very
> > big around 10chars each) get a numerical hash value.
> > Then group by primary_key, and get a sum or avg, or whatever.
>
> What possible benefit could that provide?
>
> > If the hash value would be big enough I could use it for comparing if
> > two tables are the same of the content or not.
>
> How? Methinks this be folly of a grand order.
>
> > the question is, if there is such a function, I could not find it that
> > takes varchar2 and returns a value.
>
> DBMS_CRYPTO.HASH_MD4
> DBMS_CRYPTO.HASH_MD5
> DBMS_CRYPTO.HASH_SH1
>
> are available, but they won't hash an entire table.
>
> > thanks
> > chris
>
> I would be seriously re-thinking this idea; what business case does it
> support? I have a strong feeling this is a path which is rapidly
> going nowhere.
>
> David Fitzjarrell

The idea is the same as zipping and unzipping files, the software creates a kind of hash value for the file, and after unpacking it checks if the new counted hash value is the same that was originally, and then it means we got the same file.

I wanted to use this procedure to check periodically if a table changed.
I would save the original hash value, and run periodically checks on the table if the hash value is different, if it is the case it means the content of the table changed.

chris Received on Tue Aug 14 2007 - 12:19:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US