Chapter 12.3. SQLObject and Inheritance

Object-oriented programming languages provide many ways to represent relationships between objects: composition, containment, and inheritance. Relational databases can represent composition by reference as a row that has a foreign key column that points into another table. The DB can also represent containment with a reference table. However, there’s no good way to represent inheritance through relational algebra.

Inheritance is often the best tool available to avoid code repetition, and SQLObject provides convenient methods to help you map the inheritance method to elements in the RDBMS. With that said, note that most problems can be resolved in multiple ways, and in some cases you might want to consider ...

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.