[Zope] Relational Philosophy
Steve Alexander
steve@cat-box.net
Thu, 24 Jan 2002 11:20:44 +0000
Paul Holman wrote:
> I'm working on writing an app in Zope and would like to try using the
> Zope object database exclusively. The problem I run into is how to best
> go about modeling relational data. For instance, I might have a list of
> courses and a list of students. If I create a course object and put
> student objects under it, I'll end up with duplicate student objects as
> students are in more than one course:
>
> Basketweaving
> Trent
> Eve
> Alice
> Object-Relational Modeling 101
> Bob
> Trent
> Alice
>
> Obviously if I do it the other way around, and put courses inside
> student objects, I have the same problem. I need to do a many-to-many
> relationship.
Take a look at the Specialist pattern from the ZPatterns documentation.
You don't need to use ZPatterns to use a Specialist pattern.
http://www.zope.org/Members/pje/Wikis/ZPatterns/Specialists
--
Steve Alexander