mysql - Data Structure -
i building online form, 20 multiple choice checkboxes.
i can nested data command.
raise params.to_yaml
i need store these data , call them again later. want sort out user chose specific checkbox, i.e. chose checkbox no.2?
what's best way store these data in database?
the easiest way run reports on collected data going storing in structured fashion.
something along lines of:
question has_many answers answer belongs user
creating question, answer , user models corresponding tables.
the alternative brute force through yaml data. might work smaller data sets, won't pretty. fetch of responses, iterate through responses find , collate results specific questions. think structured approach, although little more legwork initially, going easier in long run.
Comments
Post a Comment