← thecodex.expert · The Codex Family of Knowledge
Databases

SQLite

A complete SQL database in a single file. No server, no setup — perfect for learning and small apps.

What is SQLite?

SQLite is a complete SQL database contained in a single file — no server to run, no setup, no configuration. Your whole database is one .db file you can copy, email, or commit. It is the most widely deployed database in the world (it is inside your phone, your browser, and countless apps).

When should you use it?

Perfect for learning SQL, for small-to-medium apps, for desktop and mobile apps, and for prototypes. Use it when you do not need multiple servers writing at once. When you outgrow it, the SQL you learned transfers directly to PostgreSQL.

How to set it up

Nothing to install — it is built into Python (import sqlite3) and most languages. The database is created the first time you open a file.

How it connects to your code

In Python: conn = sqlite3.connect("app.db"), then run SQL with conn.execute(...). That is the entire setup.

SQLite Reference Topics 11 planned

These are the topics planned for this reference. They are not written yet — the list is published so you can see what is coming. Everything already complete on this site is linked from the Languages section.

What is SQLite Coming soon

Origin (D. Richard Hipp, 2000), public domain, and its unique embedded design.

Guide in progress
Installing and Using SQLite Coming soon

Often already present — the sqlite3 CLI and language bindings.

Guide in progress
Data Types in SQLite Coming soon

Dynamic typing: SQLite's storage classes, unlike other SQL databases.

Guide in progress
Creating Tables Coming soon

CREATE TABLE syntax and SQLite's relaxed type affinity rules.

Guide in progress
Querying with SQL Coming soon

A large, standards-compliant subset of SQL in a tiny engine.

Guide in progress
Transactions in SQLite Coming soon

ACID transactions with a single-writer model.

Guide in progress
Indexes in SQLite Coming soon

B-tree indexes and the automatic rowid.

Guide in progress
The SQLite File Format Coming soon

Why a single .db file is both database and container.

Guide in progress
When to Use SQLite (and When Not To) Coming soon

Great for embedded/local use; not built for high-concurrency writes.

Guide in progress
Connecting from Application Code Coming soon

Built into most language standard libraries already.

Guide in progress
SQLite in Mobile and Embedded Systems Coming soon

The most widely deployed database engine in the world.

Guide in progress