[Zope-PTK] Remembering information member-by-member

Dan L. Pierson dan@sol.control.com
Fri, 14 Jul 2000 14:32:53 -0400 (EDT)


Chris Withers writes:
 > Dennis Nichols wrote:
 > > This might be off the wall, but please let me know what you think...
 > > 
 > > I would like an object, such as a poll object, to say to some (membership?)
 > > object, "please note that member X has now taken poll Y". And then later,
 > > be able to ask "has member X has taken poll Y?"
 > 
 > Why not just store the memberid/reference to member object as an
 > atribute of your poll results row?
 > 
 > Then you could do something like (pseudo SQL ;-):
 > SELECT count(memberid) FROM poll_result where memberid=YourInput
 > 
 > To find out if a member had taken that poll...

I think that this is a better solution than storing the information
with each member (possibly unless you're sure that you will frequently
want to collect the history of which polls a member has taken).  This
way, all of the poll-specific data stays with the poll object and can
be deleted, archived, etc. together instead of scattering a constantly 
growing set of data over the entire membership.