Databases and connections
SQLite database files, open connections, and persistent data.
SQLite is an embedded database engine. It runs inside an application and reads and writes local files without a separate database server. A database contains tables, indexes, and other schema objects. See SQLite's overview.
Connections
A connection is an open handle to a database. It holds the state needed to run SQL, including its transaction and connection settings. Several connections can access the same database file; each has its own transaction. Isolation and concurrency explains when they see each other's changes.
File lifetimes
Closing a connection releases its resources and leaves committed data in the file. Removing the database file removes that data.
SQLite can also create companion journal files. In WAL mode, committed changes can remain in the -wal file until checkpointing copies them into the main file. Copying only the main file while the database is active can lose data.
For Nitro SQLite's open, close, delete, and file-location APIs, see database lifecycle.