SQLite is the most widely used database in the world — and most people have never heard of it. It lives inside every Android phone, every iPhone, every browser, and thousands of apps. It is not a server you install and run: it is a small library that stores a whole database in a single file. If you want to learn databases without setting up a server, SQLite is where to start.
The idea is simple. You open a file, you run SQL, and the data is there — no server, no password, no network. Here is a tiny example:
CREATE TABLE books (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
author TEXT,
pages INTEGER
);
INSERT INTO books (title, author, pages)
VALUES ('Atomic Habits', 'James Clear', 320);
SELECT title, author FROM books WHERE pages > 200;
That is a complete database: a table, a row, and a query. You can run it from the command line with sqlite3 mybooks.db, from Python with the built-in sqlite3 module, or from any language you use.
SQLite is a good first database because it removes every obstacle between you and SQL. There is no installation, no user account, no port to open. You learn the real skills — tables, queries, joins, indexes — on a database you can copy, email, or delete like any other file. And the SQL you learn transfers directly to PostgreSQL, MySQL, and every other relational database.
How to start: install the sqlite3 command-line tool, or just open Python and import sqlite3 — it is already there. Create the books table above, insert five books you have read, and write queries: all books by one author, the longest book, the average page count. Then build a small app around it — a reading tracker, an expense list, a todo app — with SQLite as the storage.
Who is it for? Beginners learning SQL, mobile and desktop developers who need local storage, and anyone building a small app that does not need a server database. If your app has thousands of users writing at the same time, you need a server database — but for learning, prototypes, and local apps, SQLite is often all you need.
The limits are honest: SQLite allows only one writer at a time, it has no built-in user accounts or permissions, and it is not designed for heavy concurrent writes. Use it for local data and learning; move to PostgreSQL when your app grows into a real server.
Your first step today: create the books table, insert five real books, and run a query that finds your longest one. You have just used the database that runs inside billions of devices — and it fits in a single file.
Top comments (0)