Chapter 11.1.2. Many-to-Many Relationships (RelatedJoin)

The one-to-many relationship can be used to describe a lot of the data you might have. Functions belong to one module. But sometimes you need to express relationships that don’t have that “belong to” character. And that’s where many-to-many relationships come in.

In dry academic terms, a many-to-many relationship means that object type A has or contains multiple objects of type B, and at the same time, object B has or contains multiple objects of type A. A real-life example is friends. You can have a whole bunch of friends, and all of those friends can have a whole bunch of other friends besides just you. Or, if you spend too much time programming to have friends, perhaps another ...

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.