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
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
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 )
Somehow, my Zope install got hosed today. Zope appears to start up OK, but as soon as I make an HTTP request to it, I get this error in the zope log: Unix socket: /var/lib/zope/var/Z2-pcgi.soc python2.1: ../Python/ceval.c:687: eval_code2: Assertion `(stack_pointer - f->f_v aluestack) <= f->f_stacksize' failed. Then it appears to try and restart. Is this the sort of thing that is worth tracking down, or should I just reinstall Zope? Thanks, pablos. -- Paul Holman Kadrevian Nonlinear Accelerator pablos@kadrevis.com 415.420.3806
Hi Paul, Believe it or not, you've had the same problem all along. ;-) But recently you installed Python 2.1.2 which, instead of silently continuing with memory corruption after doing a nonsensical stack size computation like Python 2.1.1, it just dies. All Zope releases in the 2.4 series have bugs in their compiler modules which cause stack sizes to be computed improperly, triggering this error. If you want to "fix" it, either use the Zope-2_4-branch from CVS or wait until Zope 2.4.4 is released (which I've heard from a little birdy is really soon). - C Paul Holman wrote:
Somehow, my Zope install got hosed today. Zope appears to start up OK, but as soon as I make an HTTP request to it, I get this error in the zope log:
Unix socket: /var/lib/zope/var/Z2-pcgi.soc python2.1: ../Python/ceval.c:687: eval_code2: Assertion `(stack_pointer - f->f_v aluestack) <= f->f_stacksize' failed.
Then it appears to try and restart.
Is this the sort of thing that is worth tracking down, or should I just reinstall Zope?
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 )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Wow, you guys were both right on. I'm using Debian, so I installed Zope from Unstable (2.4.99beta) and it is working again. Thanks for the speedy & accurate help. pablos. On Friday, January 25, 2002, at 06:55 AM, Chris McDonough wrote:
Hi Paul,
Believe it or not, you've had the same problem all along. ;-) But recently you installed Python 2.1.2 which, instead of silently continuing with memory corruption after doing a nonsensical stack size computation like Python 2.1.1, it just dies.
All Zope releases in the 2.4 series have bugs in their compiler modules which cause stack sizes to be computed improperly, triggering this error. If you want to "fix" it, either use the Zope-2_4-branch from CVS or wait until Zope 2.4.4 is released (which I've heard from a little birdy is really soon).
- C
Paul Holman wrote:
Somehow, my Zope install got hosed today. Zope appears to start up OK, but as soon as I make an HTTP request to it, I get this error in the zope log: Unix socket: /var/lib/zope/var/Z2-pcgi.soc python2.1: ../Python/ceval.c:687: eval_code2: Assertion `(stack_pointer - f->f_v aluestack) <= f->f_stacksize' failed. Then it appears to try and restart. Is this the sort of thing that is worth tracking down, or should I just reinstall Zope? 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 )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
-- Paul Holman Kadrevian Nonlinear Accelerator pablos@kadrevis.com 415.420.3806
participants (4)
-
Chris McDonough -
Max M -
Paul Holman -
Steve Alexander