mardi 24 mars 2015

What happens technically when a Sqlite database is corrupted and how to detect?

I am doing a task of handling database corruption, so I have been through SQLite's How to corrupt an SQLite database and SO's How to verify if a database file is valid/consistent.


But I have more specific questions w.r.t my scenario. Boolean answers are OK



  1. If a sqlite database file is corrupted will I be able to open it? Sometimes or always?

  2. If answer1 is yes and I open it, can read/write operations crash my application or will simply return error which can be handled?

  3. If corruption happens, can some of my following(next) read/writes succeed or every read/write will return error?

  4. Can after successfully creating and closing a database file, I use md5sum to detect any corruption in the next opening of file, provided I want to avoid quick_check and integrity_check as they are slower?


Aucun commentaire:

Enregistrer un commentaire