title: ResultSet vs RowSet: Which one to choose and when?
body: <p>So I'm aware of some relative differences i.e., the <code>ResultSet</code> has an 'open connection' to the database whereas a <code>RowSet</code> works in a 'disconnected' fashion.</p>
  <p>But that's pretty much what I understand (may be incorrect):</p>
  <p>My question is then this - under what circumstances is one preferable over the other? What are each of their strengths/weaknesses?</p>
  <ul>
  <li><p>From what I feel a <code>RowSet</code>, working in
  disconnected mode especially for
  &quot;read-only&quot; queries, would have
  better performance in a highly
  concurrent system. Is that correct?
  If that's the case is it safe to say
  <code>RowSet</code> is always preferable to
  <code>ResultSet</code> for readonly queries?</p>
  </li>
  <li><p>If I'm correct iterating over the
  <code>RowSet</code> doesn't throw SQL Exceptions,
  but is that a benefit? The other
  being that <code>RowSet</code> is serializable.
  But my concern is primarily from a
  performance perspective what would be
  the choice?</p>
  </li>
  <li><p>But does it even matter for
  read-write queries?? Can you sync the
  ResultSet back to the DB? (I'm not
  sure if that's possible (It may be
  and I just can't recollect or google
  it well enough :) It's been a while
  with raw JDBC...</p>
  </li>
  </ul>
  <p>Any ideas? There are some missing gaps in my knowledge as is evident :)</p>
  <p>The reason I ask is I'd like to choose between implementing Spring-JDBC's <code>ResultSetExtractor</code> Interface versus return an <code>SqlRowSet</code> when processing some data. This question just got me curious to how to decide what to choose when, other than tossing a coin :)</p>