John Bell wrote:[color=blue]
> Hi
>
> You talk about a single table per section, but I am not sure that
> that sort of design would be any different to your suggested one.[/color]
Well, I was considering aggregating all responses into one table. As I
described, it would require the addition of several columns that are
irrelevant to 90% of the questions. The result would be a non-normalized
mess, though it would probably be easier to query and report on.
[color=blue]
> You could have a separate table for each type of questions i.e have
> all Y/N answers in one table, also Fail/Active/Nothing/Complementary
> can be a second attribute therefore you will not have separate
> columns for the Y/N part.[/color]
Interesting. That's kind of in-between where I am now and my "generic"
approach under consideration. I'll look into this a little more. I do have
some tables with similar response types I could combine.
[color=blue]
> You may also want to check out using SQL_VARIANT as a data type.
>[/color]
http://msdn.microsoft.com/library/de...asp?frame=true
It's an Access system, so text would be my only real option if I wanted to
combine response types into one column.
Thanks for your help.
[color=blue]
> Full text searching would possibly be a different solution.
>
> John
>
> "DFS" <nospam@nospam.com> wrote in message
> news:41Yyd.2693$Zp1.2514@fe07.lga...[color=green]
>> I've written several survey systems in which the majority of the
>> questions have the same or similar responses (Yes/No, True/False,
>> scale of 1 - 5, etc).
>>
>> But this latest survey system I'm working on has 8-10 sections, with
>> a variety of question attributes and answer scales. Some items have
>> just a description and require a Yes/No answer, others have a
>> description and an active status and require a Yes/No and price
>> answer, some require a comment,
>> etc.
>>
>> Rather than build a separate response table for each survey section,
>> I was thinking of building one generic response table, and trying to
>> force all sections to fit by adding columns - some of which won't
>> apply to some items.
>> Like this:
>>
>> Survey Category (will apply to all items)
>> Survey Section (will apply to all items)
>> Item Description (will apply to all items)
>> Item YN (will apply to all items)
>> Item Price (will apply to about 10% of the items)
>> Item Points (will apply to about 10% of the items)
>> Item Active YN (will apply to about 10% of the items)
>> Item Fail YN (will apply to about 10% of the items)
>> Item Comment (will apply to about 10% of the items)
>>
>> For instance, in the structure above the field "Item YN" would
>> represent multiple types of answers: is the item in use?, is the
>> item in place?, is the item given away for free?, is the item on
>> display?, etc. Basically, anywhere a Yes/No answer is used.
>>
>> The advantage is one source table (rather than 8) for storing
>> answers, and it might be easier to query and report on.
>>
>> The disadvantages I see are 1) it's more difficult to understand the
>> meaning
>> of the responses when the answer field is named Item YN, and 2) you
>> have a non-normalized table that's difficult for a 3rd party to
>> understand.
>>
>> If I have the questions and responses in separate tables, I'll use
>> names like "ItemComplimentaryYN" and "ItemUsedYN" depending on the
>> question. It's
>> easier for others to learn the data.
>>
>> I actually don't like the "generic" approach, and probably won't use
>> it, but
>> I figured I'd try to get some input from others who've written survey
>> systems.
>>
>> Thanks[/color][/color]