> I'd like to store the results for the event, but can't
> figure out how. The event object is generic, but the results
> structures are specific to that event.

What first occurs to me is to give the Event class a TextField called
'results' which contains a pickled python object/dict/list (whatever)
of the results. This gives maximum flexibility in what you are storing
(this is what the django.contrib.sessions code does for session
variables), but it means that the results are not easily operated on
by DB calls.

If you do need to have certain operations performed on the results
(something like "all races that Bob competed in"), you might extract
that info into a separate text field of comma-separated-values to make
searching/life easier. If you have many entries for the same
contestant, you might represent this as a separate mapping model.
Admittedly this breaks any "normalization" of your data, but that's
already happened by the variable shape of the results themselves.
Besides, as someone (who?) said a while ago, normalization is for
wimps.

  HTH,
  Peter

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to