liveBook · Manning

DatabaseManager

As explained in Practices of the Python Pro

Bark's database-access class that exposes operations for creating tables and adding, selecting, and deleting records.

DatabaseManager isolates database access in Bark’s persistence layer. It opens a SQLite file and turns table creation, record changes, and queries into reusable methods. section 6.3.1

A small SQLite-backed manager

Constructing DatabaseManager with a database filename creates a sqlite3 connection. Its shared execution helper runs SQL inside the connection context, while methods such as add() and select() supply values separately from SQL statements.

How Practices of the Python Pro covers it

How deep it goes
Explains connection management and reusable CRUD-style methods, but stops short of a complete update operation.
Examples
Uses bookmark tables, parameterized INSERT and DELETE statements, filtered SELECT queries, and Python method implementations.
What it assumes
Uses Python’s sqlite3 module and basic SQL statements while introducing database connections and persistence-layer separation.
What you can do after
Build and operate a small SQLite access layer with table, insertion, deletion, and selection methods.
How it connects
Connects the persistence layer, SQLite, SQL, sqlite3, and CRUD operations.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practices of the Python Pro. The section links point to the parts of the book it draws on.