Click to See Complete Forum and Search --> : Database Structure Question


Chamark
06-24-2007, 05:05 PM
Using MS-SQL2000. I'm creating a Web form with 10 questions. Each question
can be answered by selecting one of 5 radio buttons (strongly agree, agree,
neutral, disagee, strongly disagree). Once all the questions are answered the
form is submitted to the database. I need help on how to structure the
database.

I need to be able to report results as


|Question| |SA| |A| |N| |D| |SD|
Question 1 5 2 2 1 3
Questiion 2 3 1 3 2 1

I tried creating the table with each question being a column, but since
SQL2000 doesn't support pivot I think I need another structure?

Your help is greatly appreciated. Thanks:confused:

bubbisthedog
06-25-2007, 08:57 AM
QUESTIONS

QID | QUESTION
------------------------
1 | Question 1
2 | Question 2
. . .
9 | Question 9
10 | Question 10

RESPONSES

RID | QID | RTID
-----------------------------
1 | 1 | 3
2 | 2 | 3
3 | 3 | 5
. . .

RESPONSETYPES

RTID | RESPONSE
------------------------
1 | Strongly Disagree
2 | Disagree
3 | Neutral
4 | Agree
5 | Strongly Agree

MrCoder
06-25-2007, 11:59 AM
Couldn't RTID be a enum if the RESPONSETYPES are always static?

btw: I know almost nothing about MS SQL :)