Accessing Relational Databases with Python
This presentation will introduce the means and patterns of accessing databases from Python. It will start with a brief overview of the Python Database API (2.0) with some interactive examples. A quick overview of which databases are supported will follow with a brief diversion to non-relational data stores. Then I will talk about some of the issues that the DB API doesn't solve and which commonly surprise people new to either databases or Python. In particular I'll concentrate on the proper use of bind variables and how to make your SQL as database neutral as possible. I'll contrast the Python DB API approach with that of Java (JDBC) and Perl (DBI).
This then will lead to a discussion of Python database 'helper' modules like dtuple.py, db_row and PyTable. Finally I'll talk about the available Object Relational Mappers, introducing them based on the pattern they implement. If there's enough time left I'll attempt to demonstrate one or two of the more popular ORM tools and examine their strengths and weaknesses.
Keywords: python, database, rdbms
Andy Todd
Halfcooked Solutions
|
Ref: OS6P0025