News for hackers. Stuff that matters.
Re:Many small queries are efficient in SQLite by slaymaker1907 on Tuesday February 16, 2021 @05:04PM (#26159344)
You could get SQLite to work as document files exposed to the user so long as you use sessions[1]. When a file is opened, copy the DB to a temporary file or to use memory and write all changes during operation to this new DB, recording them all in a session. When the user explicitly saves a document, apply the session to the real DB.

[1]: https://www.sqlite.org/sessionintro.html#:~:text=1%20Introdu...

Re:Many small queries are efficient in SQLite by yarcob on Wednesday February 17, 2021 @09:44AM (#26166793)
That doesn't sounds like it would just combine the drawbacks of both approaches: You end up with slow open/save operations, and the writes to the db still aren't necessarily atomic (eg. if a user copies the file while changes are being applied)