confused myself

  • Thread starter Thread starter leonaisse
  • Start date Start date
L

leonaisse

Hi All

I need your help please, i've been thinking about this one for so long I
have confused myself!

I have a web app that contains a clients table in SQL server.

When a new client is entered onto the system I want to take all the usual
details(already complete) and on the next page I have 135 questions which
could warrant a yes, no or not asked answer and store the answers to the 135
questions in a DB table linked to the customer.

What is the quickest way for me to code this page and the best DB structure
to do this. I have the 135 questions in a DB table also.

Thanks

Leon
 
If, and only if, you are sure there will only be 135 questions, you can code
a single table with all 135 questions as different fields. As it is
difficult to guarantee no further questions will ever be added, unless you
are in 100% control, a better option is something like this

Table 1 = Questions
QuestionID
QuestionText

Table 2 = User_Question
User_QuestionID
QuestionID
UserID
AnswerText

This allows you to alter the number of questions, esp. if the delivery of
the questions is dynamic.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
 
Back
Top