SQLObject implements the Active-Record pattern.
Use ?debug=True to have SQLObject print the SQL queries it generates to the console.
SQLObject manages your database connections for you, and in TurboGears it gets the connection string from dev.cfg or prod.cfg.
In addition to defining your classes first and generating you database tables from those classes the way we've been doing it in this book, you can also use _fromDatabase=true.
SQLObject provides several different ways to define queries. The simplest of these is get(ID), but select() is just about as easy.
Only slightly more complex is the selectBy() method, which you can use to get records matching specific criteria.