Re:Siren Call of SQLite on the Server
by lolinder on Tuesday February 18, 2025 @07:29AM
(#43088745)
For the one DB file per user question, I'll take a stab at a solution:
* Global store of user identifiers mapped to user IDs. Identifiers can change but the underlying user ID is immutable.
* One DB per user ID.
The per-user DB doesn't really need to know the user identifier, and at auth time you don't need to access the business logic, so cross-DB updates should not be a problem.
In the general case, similar logic applies: you can't partition just anywhere, but where you can partition is pretty well defined.
* Global store of user identifiers mapped to user IDs. Identifiers can change but the underlying user ID is immutable.
* One DB per user ID.
The per-user DB doesn't really need to know the user identifier, and at auth time you don't need to access the business logic, so cross-DB updates should not be a problem.
In the general case, similar logic applies: you can't partition just anywhere, but where you can partition is pretty well defined.