PearlJamFanatic
asked on
Comparing recordsets in java
I need to compare a few records from 2 different versions of a DB and point out the mismatch if any. What is the best way to do this? Also I need to point out the mismatch in the structure (column name mismatch, additoinal column) of the table if any.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
here you'll find two more considerations
http://www.thatsjava.com/java-essentials/11433/
And again they are appropriate to some cases and may not be so good for other situations.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
importing one of them into the same database as the other and use
database facilities to compare them, as that will definitel will be more effective.
If you need to do it only once then probably connecting to two databases, making sure
you order your query in the same way and stepping through ResultSets one by one will
be some kind of the option. The more information you have where you can expect differences, which wouild allow
you to minimize the number of rows you select - the better you are off with the required
resources, times. Well, it is hard to beleve ther could be one best straeguy in this task for
all different situations you can imagine with respect to sizes of the record sets, type of data, probability of the differences, etc.
If you have effective databases - the less rows you have to select and analyze in
Java code, the more you can do on the server side - the better.