A simple way to prevent unauthorized access to a database is to encrypt the relevant part of the file header so that it's not recognized as a db outside your programme. Decrypt the header programmatically inside your app and encrypt it on closing.