SQLObject provides a simple object-oriented view of your tables, but if that were all it could do we'd still be in trouble. Sometimes you need to create one-to-many relationships, create complex queries, or handle very large datasets without bringing your server to its knees. Fortunately SQLObject has features that make all these tasks not only possible, but relatively easy.
Now that we know the basics of SQLObject, we can delve into a few of its more interesting capabilities. In this chapter, we look at how to set up relationships between tables, how to handle more complex database queries, and how to optimize queries for large or complex datasets.
We also take a deeper look at how sqlobject classes work, and how to modify the default behavior of SQLObjects using the sqlmeta class. Among other things, this is a critical piece of knowledge if you ever need to create model objects to match a "legacy" database.