SQLite as a relational database
SQLite stores relational data in a local database file and is included with Python through the sqlite3 module. It is useful for prototypes, local applications, tests and smaller workloads.
Connections and transactions
A connection executes SQL statements and controls transactions. Create tables with constraints such as primary keys and NOT NULL where appropriate. Commit writes deliberately and close connections reliably.
Never build SQL with user input
Use parameterized queries with placeholders. String concatenation can turn ordinary user input into SQL injection. This is one of the most important database habits to learn early.
Practice: build a notes table and implement create, list and delete operations using only parameterized SQL.