Other posters have taken care of very important aspects of your circumstances, 
but I wanted to mention one I didn't see anyone mention.  Settings.

If you compile SQLite without changing compilation settings, and use it without 
changing defaults, SQLite is extremely good at avoiding corruption, and at 
recovering after corruption.  This includes corruption due to power-loss at any 
stage while changes are being made to the database.

However, settings can be made which improve SQLite for some specific uses.  
They make it faster.  Or use less memory.  Or use less filespace while working. 
 Unfortunately some of them all sacrifice harness against corruption.

These settings can be made at three (or more ?  not sure) different places:

1) Compilation settings when the SQLite API is compiled
2) Extra parameters passed when the database is opened
3) PRAGMA settings made at any time while the database is open

To assess how 'hard' your use of SQLite is against corruption, you would have 
to track down whether any of the above three have been done.

1) May or may not be easy.  Do you know how SQLite is included in your project 
?  Is it part of a library downloaded from somewhere or did your programmer 
compile it themself ?  If the former, you can assume that whoever prepared the 
library didn't mess with default settings.  If the latter, can you track down 
the compilation settings they used ?

2) Do you have the source code for your project ?  Can you find all places 
where a database is opened ?  If it uses the SQLite API directly you can just 
search for "sqlite3_open".  See whether you can spot whether anything except 
file name & path are passed.

3) Do you have the source code for your project ?  Can you do a global search 
for "PRAGMA" ?  Only a few of the PRAGMAs reduce integrity.  Most of them are 
fine.  But you can look them up and see for yourself.

The whole of the above is merely me being picky.  Millions of SQLite users just 
leave all settings at their defaults.  But it seems to be the sort of thing 
you're asking about.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to