title: Compare two data set(two result set) from different data base in java
body: <p>I am trying to compare two data set from different DB through Java.
  Source db:-oracle,sql,other database.
  Target <code>db:Hive</code></p>
  
  <p>I have made a JDBC connection to both databases and fetched the result in two different result sets.</p>
  
  <pre><code>sourceData  
  targetData
  </code></pre>
  
  <p>Now I want to compare the two result sets and point out the differences. The approach I am thinking is to add both result sets to hash map and compare. Please let me know if my approach is correct or is there a better way to do the same. </p>
  
  <p>Please share links that could help me.</p>
  
  <p>Thanks in advance.</p>