SQLite Forum

Exclusive write-only lock? (Allow only one process read-write, and multiple read-only)
Login
In the scenario you mentioned, you might ponder what should happen if two apps both tried to be the boss, both forcing everything else to stop writing.

You'll come up with one of the many modes and flags which SQLite already makes available: WAL mode, <code>BEGIN IMMEDIATE</code>, opening with read-only privileges, etc..  There are lots of ways to manipulate SQLite this way and you'll probably find one that suits you.