# SQLite

> A tiny SQL database in one file. There is no server to run.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** SQLite3, Sqlite

## Think of it like

Think of it like a notebook in your pocket. It is small, but it is always with you.

## Definition

SQLite is a small SQL database that lives in one file, with no server to run. The app reads and writes that file directly. It is built into phones, web browsers and Python, which makes it one of the most used programs in the world. It is perfect for apps, tests and small sites. It is less suited to many users writing at the same moment.

## Example

Emma's phone app keeps its notes in an SQLite file. Python can open the same kind of file with no extra install.

## Example code

```python
import sqlite3
con = sqlite3.connect("shop.db")  # makes the file if needed
print(sqlite3.sqlite_version)
# 3.46.1
```

One line makes a whole database in a file called shop.db.

## Why it matters

SQLite gives you a real SQL database with zero setup. It is great for learning and for apps.

## Common mistake

Using it for a busy website with many writers at once. It allows only one writer at a time.

## Three principles

- **One file.** The whole database is a file.
- **No server.** The app opens it directly.
- **One writer at a time.** Fine for apps, not big sites.

## Related terms

- [Relational Database](https://learn.benibix.com/term/development/relational-database)
- [PostgreSQL](https://learn.benibix.com/term/development/postgresql)
- [MySQL](https://learn.benibix.com/term/development/mysql)
- [Structured Query Language (SQL)](https://learn.benibix.com/term/development/sql)

## Told apart from

- [DuckDB vs SQLite](https://learn.benibix.com/compare/duckdb-vs-sqlite): People think DuckDB is just SQLite. Both run inside your program, with no server. SQLite is built for an app's own data, with many small reads and writes. DuckDB is built for sums and counts over millions of rows. Many teams use both, each for its own job.
- [SQLite vs PostgreSQL](https://learn.benibix.com/compare/sqlite-vs-postgresql): People think SQLite is a toy version of Postgres, and it is not. It is a different shape. SQLite has no server, and the whole database is one file inside your app. PostgreSQL is a server that many apps and users connect to at once. SQLite fits a phone app or a small site. Postgres fits a busy app with many writers.

---

Source: https://learn.benibix.com/term/development/sqlite
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
