confused myself

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
 
C

Cowboy \(Gregory A. Beamer\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top