If you have no further requirements, then it doesn't really matter how you store it. Until you know *how* you're going to use the information, then there's no use in speculating about the "best" way. As you know more about what you're going to do with the data, you'll get clues on how best to structure it.

For example: If *all* your reports are keyed from the user ID, then a single flat table (or flat file) may be perfectly sufficient. If the questions are grouped into categories and you report based on categories, you'll want to find a way to separate the questions...such as a different table for each category. If you find that questions are continually being added to the system, you'll probably want to put the question definitions into a table, etc.

So think about the entirety of the problem, then figure out what scheme will help you make the simplest (to write and maintain) code. Give a slight nod to expected "expansion" by not making design decisions that make expected changes too difficult.

...roboticus

In reply to Re: Help on questionnaire by roboticus
in thread Help on questionnaire by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.