title: What are the .db-shm and .db-wal extensions in Sqlite databases?
body: <p>I am seeing some strange behavior with my application and the state of its database file after running some tests that close the database, delete it, and replace it with a test fixture.  When I examine the database file with a tool on my debugging PC, it doesn't match what the application itself seems to be reporting.  It's possible that this strange behavior is related to <a href="http://code.google.com/p/android/issues/detail?id=13727" rel="noreferrer">this bug</a>.</p>
  
  <p>I noticed that there are two files with the same base name as the database (with the normal <code>.db</code> extension.)  The file extensions are <code>.db-shm</code> and <code>.db-wal</code>, and each is newer than the <code>.db</code> file's timestamp.  </p>
  
  <p>I assume that these are some type of temporary files.  However, I am wondering if the application is terminated, shouldn't they be deleted?  More importantly, I assume whatever data is stored in them is updated inside the <code>.db</code> file before the application is terminated by the operating system.  Is this correct?</p>