title: Custom-made DAO: persist and record exists?
body: <p>Just for the kick of it I'm writing some DAOs using plain JDBC.</p>
  
  <p>At the moment I have an add method which saves entity data to a record. Now, I need to consider the case where a record already exists. I am guessing that in a ready-made ORM a persist method:</p>
  
  <ul>
  <li>Either checks if a record already exists. In this case, a SELECT on PK would be more efficient than a find ?</li>
  <li>Or an Exception is thrown when for example there's a conflicting primary key.</li>
  <li>Both ?</li>
  </ul>
  
  <p>How is this usually done ?</p>