DB comparison case (in)sensitivity ordering

From: Jacqui caren <Jacqui.Caren_at_ig.co.uk>
Date: Mon, 26 Nov 2001 17:26:02 GMT
Message-ID: <9165BCF95JacquiCarenigcouk_at_195.8.69.161>


Hello,

      A member of staff is using a very simple algorithm to attempt to sync two databases together.

The databases will share a common schema but will may be different platforms i.e. Oracle vs SQLsvr.

The algorithm selects one record (keyfields only) from each DB with identical order by clauses.

This means that we get

  1,A                  1,A
  2,A                  
  2,B                  2,B
                       2,C
  3,A
  2,B                  3,B


etc.

We compare key values and
if equel
then
  we have a match
  get next source record
  get next dest record
elsif source lt dest
then
  extra record in dest

  • action to get record from dest

  get next source record
else
  missing record in dest

  • action to store source record in dest get next dest record end if

The alg. relies upon identical ordering
of source and dest records.

if source and dest and some mix of case
sensitivity then the algorithm falls apart.

doing an in memory sort is something we are trying to avoid - even just keyfields could eat up a lot of memory/time...

Any suggestions?

TIA,
   Jacqui Caren

p.s.
  Feel free to email responses - I will provide   a summary of responses if I get any emailed   only responses. Received on Mon Nov 26 2001 - 18:26:02 CET

Original text of this message