# SQLite

> A complete SQL database that lives in a single file, with no server to run.

- Level: Intermediate
- Topics: Data, Software
- URL: https://tidbit.legios.com.ar/sqlite/
- In Spanish: [SQLite](https://tidbit.legios.com.ar/es/sqlite/)

**SQLite** is a relational database you query with SQL, but with a twist: there is no server. It is a small library that gets built into the program that uses it, and the whole database, every table and index, is one ordinary file on disk, often ending in `.db`. Opening the database means opening the file.

That makes it ideal when one app needs its own data and nobody else does. Every Android and iPhone ships with SQLite, and apps use it to keep messages, settings and offline data. Web browsers store history and bookmarks in it, and plenty of desktop programs use it as their save format. Analysts like it too: a single `.db` file is easy to email, copy or back up.

It was created by D. Richard Hipp in 2000 and is in the public domain, so anyone can use it for anything. Its own site argues it is the most widely deployed database engine in the world, since it sits inside billions of devices. It is not built for many machines writing at once over a network; for a busy multi-user website, a server database like PostgreSQL or MySQL is the usual pick.

## An analogy

Like a notebook you carry in your pocket instead of a library you have to visit: everything is in one place, it goes where you go, but only one person writes in it at a time.

## Keep in mind

- A library inside the app, not a separate server.
- The whole database is one file you can copy like any other.
- Built into Android, iOS and the major web browsers.
- Public domain, created by D. Richard Hipp in 2000.

## Go deeper

- [About SQLite (official site)](https://www.sqlite.org/about.html)
- [Appropriate uses for SQLite (official site)](https://www.sqlite.org/whentouse.html)
- [SQLite on Wikipedia](https://en.wikipedia.org/wiki/SQLite)

## Related terms

- [Database](https://tidbit.legios.com.ar/database/): An organized store of data that programs can search and update safely.
- [SQL](https://tidbit.legios.com.ar/sql/): The language you use to ask a database questions.
- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [Database index](https://tidbit.legios.com.ar/database-index/): A sorted shortcut that lets a database find rows without reading the whole table.
- [Web browser](https://tidbit.legios.com.ar/web-browser/): The app that fetches web pages from the internet and draws them on your screen.
- [Website](https://tidbit.legios.com.ar/website/): A set of web pages under one address, stored on a server and opened in a browser.
- [PostgreSQL](https://tidbit.legios.com.ar/postgresql/): A free, open-source relational database behind a great many apps.
- [MySQL](https://tidbit.legios.com.ar/mysql/): The open-source relational database that powered the early web and still runs much of it.
