[Zope] ZODB: When to use IDs when references?

Max M maxmcorp@worldonline.dk
Thu, 23 Aug 2001 23:08:42 +0200


I would probably store the results in a dict like structure with the user id
as the key.

results['maxm'] = (some, replys)

But it really is more of a question about how you want to use the data.

regards Max M

Max M. W. Rasmussen,    Denmark.   New Media Director
private: maxmcorp@worldonline.dk work: maxm@normik.dk
-----------------------------------------------------
Shipping software is an unnatural act

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Thomas Guettler
> Sent: Thursday, August 23, 2001 7:36 PM
> To: zope@zope.org
> Subject: [Zope] ZODB: When to use IDs when references?
>
>
> Up to now I used relational databases. Now I don't know when it is
> better to use IDs and when to use references.
>
> Background: I write a Multiple Choice Python Product. There is a list
> of questions and a list of users. Both get combined in the "result"
> class. Should the class "result" have references to the questions or
> store the question-IDs?
>
> Any ideas welcome!
>
> --
> Open Source Software Solutions
> Thomas Guettler <thomas@thomas-guettler.de>
> http://www.thomas-guettler.de
>
>
> _______________________________________________
> 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 )
>