Re: Complicated query

From: Geoff Muldoon <geoff.muldoon_at_invalid.invalid>
Date: Fri, 12 Dec 2014 08:57:20 +1100
Message-ID: <MPG.2ef4be4919283c27ff_at_news.albasani.net>


In article <m6cqe7$df9$1_at_dont-email.me>, sheldonlg_at_thevillages.net says...
> > Having multiple answers in one row violates the "single value from that
> > domain" (answers).
>
> No, it doesn't if the fields all refer to DIFFERENT questions. The fact
> that they are all answers to questions is meaningless. They could just
> as easily been "department", "location", "address", etc. as being
> "answer to question 1", "answer to question 2", etc.

Regardless of the theoretical argument, it's poor "lock-in" design.

What happens when the business user decides that there needs to be another additional question? Or a new version of a question that needs to be differentiated from the old one? You will then have to alter the table. Bad karma. Far better to have a table of questions, a table of respondents/instances and an "answers" table to resolve the many-to-many relationship.

That's the sane way.

GM Received on Thu Dec 11 2014 - 22:57:20 CET

Original text of this message