I'm writing a new Windows Forms 2.0 application. This application is going to have a data file. The user will be able to open the data file, do some work and save it to disk. Then he'll be able to open it later, to continue working. Same thing as Microsoft Word and .doc files.
I'd like to use SQLite for the data file. However, I don't want changes to be written immediately to the data file. I want the user to change the data, but the file on disk remaining unchanged. Only when the user clicks "save" the data file on disk will be changed.
In your opinion, what's the best way to do this?
Should I load the contents of the SQLite DB into memory, maybe mapping it to objects, and write back to it when the user clicks "save"?
Or... is there a way to work with the data file with SQL commands (no objects), but leaving the changes in memory only, until "save" is clicked?
I'm a bit confused, I'd appreciate any idea regarding a best practice for this.
Cheers