Databases and storage · Comparison
SQLite vs PostgreSQL
Both are relational and both speak SQL. The real difference is where they run: SQLite is a file inside your app, PostgreSQL is a server your app connects to.
2 options · 8 questions side by side · updated
| Compare | SQLite | PostgreSQL |
|---|---|---|
| What it is | A library; the database is one file | A database server you connect to |
| Setup | None, it ships with the app | Install a server or use a managed host |
| Many users writing at once | One writer at a time | Built for heavy concurrent writes |
| Where it runs | On the device or one server | Anywhere, shared by many app servers |
| Users and permissions | None built in | Roles and row level security |
| Extras | FTS5 search, JSON, sqlite-vec | JSONB, PostGIS, pgvector, pg_cron |
| Cost | Free | Free to run; managed plans from free tiers up |
| Typical home | Phones, desktop apps, small sites | Web and mobile backends of any size |
How to choose between SQLite and PostgreSQL
- Pick SQLite for data that lives on one device, for prototypes, and for small sites with few writers.
- Pick PostgreSQL when many users write from many places, or when you need roles and row-level rules.
- Starting on SQLite and moving to PostgreSQL later is common, because both speak SQL.
The options
More comparisons
- PostgreSQL vs MySQLThe two most popular open-source relational databases. Either will run a typical web app well; the differences show up at the edges.
- SQL vs NoSQL: PostgreSQL vs MongoDB vs FirestoreTables or documents is a choice that shapes how you model everything. Here is a SQL database next to the two document databases it is most often weighed against.
- PostgreSQL vs ClickHousePostgreSQL is built for running an app (many small reads and writes); ClickHouse is built for analysing one (a few enormous reads). Plenty of products use both.
- Prisma vs DrizzleThe two most used TypeScript ORMs. Both give you typed queries and migrations; they differ in how close they stay to SQL.
- Supabase vs FirebaseThe two backend platforms most often weighed against each other. Both give you a database, sign-in, storage and functions; the difference starts with the database: PostgreSQL tables against Firestore documents.
- Supabase vs Appwrite vs PocketBaseThree open-source backends that bundle a database, sign-in, storage and live updates. They differ mainly in the database underneath and in how much there is to run yourself.
Crafted in the dark. Shipped to the world.
Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.