Skip to main content

SQLite

SQLite is a lightweight embedded relational database. It does not require a standalone server process and reads from or writes to a disk file directly.

Features

  • Zero configuration: no installation or admin service required
  • Single file: the entire database lives in one file
  • Cross-platform: works on all major operating systems
  • Self-contained: no external service dependency
  • Transactional: supports full ACID behavior

Using SQLite in Python

Basic operations

Context manager

Common commands

Performance tips

  1. Use transactions for batch operations.
  2. Create indexes to speed up queries.
  3. Enable WAL mode to improve concurrent read/write behavior.

Good use cases

  • Local storage for mobile apps
  • Desktop app data management
  • Small web applications
  • Embedded devices
  • Testing and prototyping

Limitations

  • Not ideal for high-concurrency writes
  • Recommended database size is typically below 1 TB
  • No built-in user permission management
Last modified on April 17, 2026