Yves Goergen <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm intending to use the SQLite database in a desktop e-mail
> application. Since most e-mails are quite valuable to me, I'd like to
> know if SQLite databases can get corrupted during normal use and
> exceptional situations like a sudden application/OS crash, power failure
> or access blocking through a virus scanner. Can it happen that under
> these circumstances all/arbitrary data from the database file can be
> lost or does that only affect the data currently being written, if any.
> How does it relate to transactions? I'm considering doing a full
> database backup each time the application quits but keeping the entire
> file twice may take much disk space. Maybe using two files, one for
> current e-mails and one as growing archive (that doesn't change often),
> would be a possibility.
> 

SQLite is highly resistant to corruption resulting for an
Application crash, OS crash, or power failure.  But that
doesn't mean it never happens.

Read more at http://www.sqlite.org/lockingv3.html, especially
section 6.0: How To Corrupt Your Database Files.  There have
been bugs in SQLite that have caused corruption.  For a list
of them, see http://www.sqlite.org/cvstrac/wiki?p=DatabaseCorruption

I keep all of my email going back years in an SQLite database, FWIW.
See http://www.sqlite.org/cvstrac/wiki?p=ExperimentalMailUserAgent

It has already been reported that Apple Mail keeps all its metadata
in an SQLite database.  (There was quite a stir in the Mac community
a few weeks ago when somebody discovered and blogged that you could
substantially increase the speed of Apple Mail by running VACUUM on
its database!)  There are other popular mail user agents that also
store either metadata or mail text or both in SQLite databases. But
since I am under a bewildering array of NDAs and am not really sure
what I can and cannot say, I'll say no more about that.  :-)

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to