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

Home -> Community -> Usenet -> c.d.o.misc -> Re: BINARY_CHECKSUM IN ORACLE

Re: BINARY_CHECKSUM IN ORACLE

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 2 May 2006 11:59:40 -0700
Message-ID: <1146596380.021807.32650@i39g2000cwa.googlegroups.com>


>Please expand. (If the uniqueness MUST BE based on a hash, I agree with
>your assessment. If it's just plain uniqueness, then I'm intrigued by
>your answer.)

Well, it's not really *uniqueness* that BINARY_CHECKSUM ensures (actually it doesn't,) it's the fact that checksummed row was or wasn't changed since checksum was last computed. ROWID uniquely identifies the row, but it doesn't change when row changes (except a few special cases.) BINARY_CHECKSUM allows you to capture hash of the row as of the time of the call and you can then use it to quickly find changed rows or check if this particular row was changed since you captured the checksum. Best use of this function and its case-insensitive cousin CHECKSUM is probably optimistic locking (OWA_OPT_LOCK package serves the same purpose.)

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Tue May 02 2006 - 13:59:40 CDT

Original text of this message

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