Design Question...
Design Question...
- Subject: Design Question...
- From: james o <email@hidden>
- Date: Thu, 30 Jun 2005 02:40:52 -0400
when my WOComponent is being built it iterates over items from a
Question table. Each questionItem will have a corresponding pulldown
menu or check box list built from a Choices table. at this point i
can think of two options on storing the values in a Results table:
1. when the WORepetition is creating the pull-downs i can bind the
corresponding Results table item to the pull down selection. the
downside to this is that sometimes when a question (200 per
evaluation) is created a result is not always entered causing blank
result row to be inserted. the downside with this method is that it
will create more data (blank rows) and won't work w/checkboxes - i'll
need a join table for this. the plus side it will require less cpu/
code to get the corresponding Question. after importing the existing
legacy data i'll have 3 million rows in the results table @ least 1/2
of them will be null...
2. have a "resultsHolderId" column (for lack of better word) in the
Question table to store the selected Choices table object. when i
save the form i'll iterate through the Question table items and grab
the Choices object and save it in the Result table. the downside to
this method is it requires more code/cpu to store the selected
Choices items in the Result table and more code to build the
Questions with corresponding Results... the plus side is that i'll
use possibly 30-50% of the 3million rows required in the above method.
schema:
PullDown/Radio: Question <-->> Results <--> Choices
CheckBoxes: Question <-->> Results <-->> ResultsChoicesJoin <--> Choices
each User table object will have multiple Results items with each
resultsItem relaed to the Question / Choices schema above.
User <-->> Results
this seems like a common design question that i don't feel confident
that either one of my solutions is *right* way to do it. any
thoughts or criticism greatly appreciated!
thanks,
./james
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden