connection
An open session between a program and a database, through which it sends statements and receives results.
In more detail
Some settings belong to the connection rather than the database: in SQLite, PRAGMA foreign_keys must be turned on for every new connection. A transaction also lives inside one connection, so two connections are two separate views of the data.
Related terms
- PRAGMA — A SQLite statement that reads or changes a setting of the database library or of the current connection.
- connection pool — A set of already open database connections that a program reuses instead of opening a new one for each request.
- database server — A database that runs as its own long-lived program and serves many client programs over network connections.
- transaction — A group of database changes that succeed or fail together, so the data is never left half-updated.
Taught in
- Why Tables And Relations Beat Files — PostgreSQL, Indexing & Relational Data Modeling
- Keys, Constraints And Referential Integrity — PostgreSQL, Indexing & Relational Data Modeling
- Where PostgreSQL Differs From SQLite — PostgreSQL, Indexing & Relational Data Modeling