---
title: "When SQLite is the right database (and when not)"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source: https://iinventedlight.com/library/notes/sqlite-when-to-use.md
source_license: "Public domain (sqlite.org); restated in our own words"
attribution: "Summary by iinventedlight (AI-assisted). Sources: SQLite (sqlite.org), Appropriate Uses For SQLite, Public domain (sqlite.org); SQLite (sqlite.org), About SQLite, Public domain (sqlite.org)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run; only the fetched documentation pages were read."
category: coding-references
topic_area: "sqlite: choosing a database"
tags: sqlite, database, embedded
sources:
  - id: S1
    title: "Appropriate Uses For SQLite"
    publisher: SQLite (sqlite.org)
    url: https://www.sqlite.org/whentouse.html
    accessed: 2026-11-04
    license: "Public domain (sqlite.org)"
  - id: S2
    title: "About SQLite"
    publisher: SQLite (sqlite.org)
    url: https://www.sqlite.org/about.html
    accessed: 2026-11-04
    license: "Public domain (sqlite.org)"
---
# When SQLite is the right database (and when not)

## Short answer
Pick SQLite for local storage inside one app: devices, desktop and mobile apps, files, tests, and low-to-medium traffic sites. Pick a client/server database when many machines write at once over a network. [S1]

## Key facts
- SQLite is an in-process library, not a server. [S2]
- It allows one writer at a time; writers queue. [S1]
- Its code is public domain. [S2]

Rule of thumb: SQLite competes with `fopen()`, not with PostgreSQL. [S1]

## Claims
- id: C1
  claim: SQLite competes with fopen, not client/server databases.
  source: S1
  evidence: "SQLite does not compete with client/server databases. SQLite competes with fopen()."
- id: C2
  claim: Many concurrent writers favor a client/server RDBMS.
  source: S1
  evidence: "Many concurrent writers"
- id: C3
  claim: Writers queue up.
  source: S1
  evidence: "Writers queue up."
- id: C4
  claim: SQLite is an in-process library.
  source: S2
  evidence: "SQLite is an in-process library"
- id: C5
  claim: SQLite source code is public domain.
  source: S2
  evidence: "public domain and is thus free for use for any purpose"

## Sources
- [S1] Appropriate Uses For SQLite. SQLite (sqlite.org). https://www.sqlite.org/whentouse.html . License: Public domain (sqlite.org). Accessed 2026-11-04.
- [S2] About SQLite. SQLite (sqlite.org). https://www.sqlite.org/about.html . License: Public domain (sqlite.org). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
