INST 326 Module 9
Topics
This module looks at ways to integrate Python programs with databases and SQL (Structured Query Language). SQL is an ISO/ANSI standard for creating relational databases, and there are a number of widely used implementations, both commercial (e.g. Oracle) and open source (e.g. MariaDB).
Learning Outcomes
After completing this module, students should understand:
- How to use the sqlite3 module to connect to a database
- How to load data to the database
- How to query the database
- The basics of CRUD operations
Readings
- Severance, Python for Everybody, Chapter 15: “Using Databases and SQL”
- Python documentation for sqlite3
Additional Readings (optional, as needed)
Historical Background
- Codd, E. F. (1970). “A Relational Model of Data for Large Shared Data Banks,” Communications of the ACM 13.6, 377-87.
Python Resources
- PEP 249: Python Database API Specification, v2.0]
- Tutorials (all of these cover much the same ground):
Database Resources
- MariaDB, a community fork of MySQL
- PostgreSQL
- Overview of Python on NoSQL (i.e. non-relational) databases