I have a disclosure form that requires a user to enter yes/no answers for a series of around 30 questions.
Is there a better way to create the table than having 30 columns that correspond the questions?
Below is my MS-SQL script, but the question relates more to structure than syntax.
CREATE TABLE Questionaire(
QuestionaireID int IDENTITY(1,1) NOT NULL,
UserID int NOT NULL,
Q1 bit NOT NULL,
Q2 bit NOT NULL,
Q3 bit NOT NULL,
... etc ...
... etc ...
Q30 bit NOT NULL
)
-- and to store the questions relating to Q1, Q2, etc...
CREATE TABLE Questions(
QuestionID int IDENTITY(1,1) NOT NULL,
Question varchar(30) NOT NULL
)