What is SQLite and When should You Use It?

Need a database without a server? Learn how SQLite stores data and when another engine fits better.

Fact-checked Reviewed by Aswin Vijayan Updated November 3, 2026 Based on 3 sources
Summary

SQLite is a self contained SQL database engine that needs no server process. Entire databases with tables, indexes, triggers and views sit in a single disk file. SQLite documentation recommends it for local storage and application files. Choose a client and server database when many clients write over a network.

Your phone, browser and many desktop apps store data in SQLite and you need to decide whether it fits your own project. Where the data lives and how many writers need it decide the answer.

This guide follows the SQLite project documentation and uses plain examples.

What is SQLite?

SQLite documentation describes it as an in process library that implements a self contained, serverless, zero configuration, transactional SQL database engine. It reads and writes directly to ordinary disk files and the code is in the public domain. See About SQLite.

  • No server. There is no separate server process.
  • One file. Full databases sit in one disk file that you can copy between systems.
  • Transactions. Transactions are ACID even after crashes or power failures.
  • Small library. With all features enabled the library can be less than 900 KiB.

What Data Types does SQLite Use?

Every value has one of five storage classes. Datatypes belong to values and not to columns. SQLite uses dynamic typing. See SQLite datatypes.

Storage ClassWhat it Stores
NULLThe NULL value
INTEGERA signed integer stored in 0, 1, 2, 3, 4, 6 or 8 bytes
REALAn 8 byte floating point number
TEXTA string in UTF-8 or UTF-16 encoding
BLOBData stored exactly as input

SQLite has no date storage class. Date functions use TEXT for ISO 8601 strings, REAL for Julian day numbers or INTEGER for Unix time.

SQLite shell example
-- Create a sample table for support tickets
CREATE TABLE tickets (id INTEGER PRIMARY KEY, title TEXT, opened TEXT);
INSERT INTO tickets (title, opened) VALUES ('Printer jam', '2026-11-03 10:15:00');
SELECT typeof(title), typeof(opened) FROM tickets;

When should You Use SQLite?

SQLite documentation states that it competes with fopen() and not with client and server databases. It lists embedded devices, application file formats, data analysis, caches and low to medium traffic websites as good uses. See appropriate uses for SQLite.

When is Another Database Better?

  • Data across a network. Choose a client and server database when the application reaches data over a network.
  • Many writers. SQLite accepts unlimited readers but only one writer at a time.
  • Very large data. SQLite states a size limit of 281 TB and many filesystems set smaller limits.

For a database type comparison see how to choose between SQL and NoSQL databases. For the basics see what a database is.

Frequently Asked Questions

What is SQLite?

SQLite is an in process library that implements a serverless, transactional SQL database engine. It saves a full database in one disk file.

Does SQLite Need a Server?

No. SQLite has no separate server process and reads and writes ordinary disk files.

How does SQLite Store Dates?

It has no date storage class. Date functions use TEXT, REAL or INTEGER values.

Is SQLite Free?

Yes. SQLite code is in the public domain for any purpose.

Can Many Users Write to SQLite at Once?

No. SQLite accepts unlimited readers but only one writer at a time. Choose a client and server database for heavy write traffic.

Key Takeaways

  • SQLite is a serverless SQL database engine in a library.
  • One disk file stores a full database.
  • Five storage classes describe all values.
  • Dates use TEXT, REAL or INTEGER values.
  • Heavy write traffic and network access call for another database.

Sources and References

This guide follows the SQLite project documentation.

  1. About SQLite (SQLite) www.sqlite.org
  2. Datatypes in SQLite (SQLite) www.sqlite.org
  3. Appropriate Uses for SQLite (SQLite) www.sqlite.org