This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

Audience

Python programmers with a desire to understand how to build cross-platform database applications.

Summary

This tutorial will introduce the student to the relational model and SQL. It will present the DB API and show how it can be used in a relatively platform-independent way to maintain source portablility of Python database applications.

Pre-registered students will receive access to electronic copies of the course notes and example materials to allow them to run the examples presented in the tutorial.

To undertake the practical examples they should have a database installed on their laptop with a DB API-compliant Python interface, and should be able to create a database for use in class. The examples should work on MySQL, PostgreSQL and Microsoft Access at the very least, and the materials will contain programs to create the necessary database to support the examples.

Before class students should verify their ability to connect to the newly-created database from Python.

Outline

1. A Super-Fast Introduction to the Relational Model

2. The DB API

3. Connecting to the Database

4. Executing Queries

5. Handling Updates

6. Object-Relational Mappers

7. Putting it All Together


2026-02-14 16:12