upvote
I used this approach to drive entire app, and it works. Nearly all data are fetched from SQLite. User can select a database, which can change app views, and the data. In my experience it is quite fast.

My example for android app:

https://f-droid.org/pl/packages/io.github.rumcajs.offlineweb...

Note that I am not android experienced programmer, and I am still learning.

reply
No. SQLite doesn't have users, proper views, row level security, proper foreign keys, or functions.
reply
What don't you like about SQLite views or foreign keys?
reply
For example you can’t insert or update a SQLite view.

I don’t even think SQLite lets you fully update a table schema.

If you start trying to use it for sql and not just storing rows you run into these everywhere. SQLite is not serving the same needs as Postgres.

reply
Yes. I already did that once though, so I skip that step now (unless ofc it's a SQLite usecase).
reply
Not really. They are two different paradigms. Use the one that is right for you.

SQLite is embedded for local applications with one writer mostly.

Postgres is for a client-server architecture with many writers.

When you start a project, you generally know which architecture you need.

reply
So if it needs to work offline, but it syncs with a server, then you use both? (And the schema becomes some kind of lowest common denominator?)
reply
I would probably do an event-source architecture, where you record events on the client and then push them to the server when you're reconnected. It has a lot of benefits, for instance, trivial auditing and free serialization.
reply
yeah essentially, see electricsql

though they also have "pglite" running in wasm.

same concept though, sync slices to an embedded db.

reply
SQLite is embedded for local applications with one writer mostly.

In 2026 that advice feels antiquated. SQLite now is absolutely useful now for concurrent, mutli-writer applications.

https://www.sqlite.org/src/doc/wal2/doc/wal2.md

reply
In a lot of cases using SQLite means you write queries incompatible with RDBMS. No need to worry about race conditions or the amount of queries you make, when 100 selects are uber fast.
reply
Yes, for very small or embedded, single-purpose systems sqlite is usually a good choice. It's very well tested, and there's nothing extra to run or manage. But be careful if the system starts growing beyond that, you'll want a real RDBMS before you abuse sqlite too much.
reply
Depends on what you mean by "small" and "growing".

If you mean database size, SQLite can handle massive amounts of data. I've seen 281 TB quoted as theoretical max size.

reply