[Zope] Relational Philosophy

Max M maxm@mxm.dk
Thu, 24 Jan 2002 11:33:11 +0000


The easiest way to do it right now is probably with:

http://www.zope.org/Members/maxm/productList/mxmRelations

regards Max M

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.
>
> So do I just start using object IDs as pointers to objects separate 
> hierarchies?
>
> Courses
>     Basketweaving
>     Object-Relational Modeling 101
> Students
>     Trent
>     Eve
>     Alice
>     Bob
>
> Let me know what you guys think.
>
> Thanks, pablos.
> -- 
> Paul Holman
> Kadrevian Nonlinear Accelerator
> pablos@kadrevis.com
> 415.420.3806
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )