Introduction
SQLite is a complete SQL database held in a single file, read and written by a small library built into the program that uses it. D. Richard Hipp released it in 2000. It ships inside every major web browser and phone operating system, so SQLite files are among the most common files in the world.
Two incompatible file formats have been used. Almost every SQLite file in use today is
an SQLite 3 database, the format since 2004. Older files may be SQLite 2 databases,
which SQLite 3 cannot open. Both are often named .db or
.sqlite.
Variations
| Format | Variation | About | Open |
|---|---|---|---|
.SQLITE | SQLite 2 database file | The older SQLite database file, from before 2004; SQLite 3 cannot open it. | Open |
.SQLITE | SQLite 3 database file | A whole SQL database in one file, in pages of B-trees. | Open |
SQLite 3
The current format, stable and backwards compatible since SQLite 3.0 in 2004. Pages of 512 to 65,536 bytes hold B-trees for each table and index, and values are stored as integers, floating point numbers, text or binary data.
The file starts with the 16 bytes SQLite format 3 and a zero
byte.
SQLite 2
The format of SQLite 2, from 2001 to 2004, with fixed 1,024-byte pages and every value stored as text. SQLite 3 cannot open it; it has to be dumped as SQL and loaded again.
The file starts with the text ** This file contains an SQLite 2.1 database
**.
Links
Reference
- Database File Format, the SQLite documentation
- SQLite Version 3 Overview, on the changes from SQLite 2