You might want to take a look at [ActorDB](https://www.actordb.com/) for a working example. It builds on SQLite and splits data to many small database files called actors. Well, actually it is much more complicated than that, see [how it works](https://www.actordb.com/docs-howitworks.html). You can have one database (actor) per user, for example. It is mostly implemented in Erlang and hasn't seen much activity lately, and the latest binary release doesn't run on my system. YMMV.