Introduction to Python Database Programming
summary
Covers the practical DB-API surface: connect returns a connection with commit/rollback and close, connection.cursor() yields a cursor that runs SQL, fetchone/fetchmany/fetchall and execute many for bulk inserts, and parameter binding to prevent SQL injection. Notes history (original spec 1996, DB-API 2.0 in 1999), common modules (psycopg2, MySQLdb, cx_Oracle, pyodbc, mx modules), issues with transaction isolation and locks, schema introspection via cursor.description, support for multiple result sets and the optional two-phase commit extension for distributed transactions.
AI-written summary · about
chapters (6)
- 0:00Python DB programming
- 1:26Motivation for DB API
- 13:31DB API basics
- 38:19Advanced DB techniques
- 56:38Schema introspection
- 57:24Q&A
related talks
24mDeveloping DB Extensions in Python: Examples for SQLite, DuckDB & PostgreSQL
33mData handling techniques in Python for Database
31mExtending SQL Databases with Python
16mdbcooper: Turn any database into an R or Python package
28mThe Ultimate Python Database Toolkit: SQLAlchemy
16mdbcooper: Turn any database into an R or Python package
37mBuilding Database Applications with Database/SQL
01h 28mSQLAlchemy and You - Making SQL the Best Thing Since Sliced Bread
