title: database restore to particular state for testing
body: <p>We use an Oracle(or postgres) database and an application server to execute integration tests. To isolate each test from another one , the database schema is dropped and re-created before each test. </p>
  
  <p>As you see this is a time taking process.  The application uses 100+ tables. We are thinking of writing custom sql to delete unwanted data from each tables. Is there a better way to save and restore database state? </p>
  
  <p>( It appears <a href="http://www.dbunit.org/" rel="nofollow">DBUnit</a> could do this, I have not tried it yet. )</p>
  
  <p>A single test involves:</p>
  
  <ul>
  <li>create database schema.</li>
  <li>Start app server.</li>
  <li>Start multiple client applications.</li>
  <li>Execute and verify. </li>
  </ul>
  
  <p>We have 5000 odd tests, taking 700 hours or so.  (we do it on a grid environment, finishes overnight)</p>
  
  <p>Most of the tests uses small data sizes, say up to 10 MB.</p>