Chapter A.1. A Quick Tour of SQLAlchemy

SQLAlchemy, which was first announced in October 2005, is a newer object relational mapper (ORM) than SQLObject. SQLAlchemy is influenced by Hibernate, SQLObject, and others; and can handle a number of cases that are difficult or impossible for SQLObject.

SQLAlchemy’s power comes from a few different aspects of its design:

  1. It has an explicit, separate database-independent SQL generation layer.

  2. Its ORM is built with the Data Mapper pattern (we’ll talk more about Data Mapper in section A.3).

  3. Its “unit-of-work” approach makes its basic object caching clear.

In addition, SQLAlchemy has some features that SQLObject lacks. It offers Oracle support and better support for compound and noninteger primary keys. ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.