Zero setup. Full SQL. Single file.
SQLite is a full relational database stored in a single
.db file on disk — no server process, no
configuration, no installation beyond the library itself. Your app
reads and writes the file directly. It supports
SQL fully, enforces types and constraints,
and handles transactions. Despite being a single file, it's
remarkably capable and is probably the most widely deployed
database in the world — every iOS and Android app, every Firefox
browser, and most desktop applications use it internally.
SQLite is the ideal starting point when you want to learn SQL and database-backed development without any setup overhead. It's also the right choice for small web projects, desktop apps, and anything with one writer at a time. As your project grows to handle significant concurrent traffic — many users writing simultaneously — a server-based database like PostgreSQL or MySQL is the upgrade path.
myapp.db
lives in your project folder and moves with it. Back it up like
any file; delete it and the data is gone.
sqlite3 in the standard library, no install needed.
Most other languages have first-class SQLite drivers.
import sqlite3
conn = sqlite3.connect("notes.db")
cur = conn.cursor()
cur.execute("""
CREATE TABLE IF NOT EXISTS notes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
body TEXT
)
""")
cur.execute("INSERT INTO notes (title, body) VALUES (?, ?)",
("First note", "SQLite is easy."))
conn.commit()
for row in cur.execute("SELECT id, title FROM notes"):
print(row)
That's a working database in pure Python. No server. No config. The
file notes.db appears in the same folder when you run
it.
sqlite3 — it's already
there. Create a connection, create a table, insert a row, and
select it back.
.db file
visually while you develop.