> >Most of us use email clients that store our mail as simple text files. An >SQLite database is no more likely to get corrupted than any other file.
I would stipulate that sqlite data is less likely to be corrupted due to bugs in sqlite itself, or due to power failure or gross program crashes. Good engineering is great, but it doesn't help the shuttle when a chunk of foam hits the wing. A sqlite database is more likely to be corrupted by bugs in the overall application. Using sqlite is a lot more complex than just appending to a text file, and because sqlite's data structures share address space with the main application, they are vulnerable to whatever bugs are present in the main application. I would also include program bugs which result in rogue queries as corruption - one "update" with a poorly constructed "where" clause can ruin your whole database. Once a sqlite database is corrupted, you've got a mess with no clear path to recovery, other than to revert to some previous backup of the entire database. On the other hand, in a file based application (such as a mail reader), In any conceivable crash, I've got backups of individual files which I can mix-n-match with whatever debris seems recoverable, and the individual mail files, even if damaged, are intelligible.