I'm putting together a survey application and need some quidance on the SQL side of things. The issue is that each survey has multiple questions, but each question is of a different type, and requires different details to be stored.tblSurveys SurveyID(PK) Name Description 1 People Survey about people 2 Places Survey about places 3 Things Survey about thingstblSurveyQuestions QuestionID(PK) SurveyID(FK) Text QType 26 1 Who's your daddy? OpenText 27 1 Rate your experience. Likert 31 2 Where do you live? MultChoice 32 2 Are you happy? Likert
Problem: Each question has additional details that apply specifically to a question type. For example, question 31 is a Multiple Choice question, and it will require answers from which to choose. Question 32 is a Likert (rating) question, so the additional details will be a choice of numeric rating vs. custom text rating (satisfied vs. dissatisfied). Question 26 is OpenText, so it may require a character limit.I'll probably end up with a table for each question type (see below), but what is the best way to connect the Survey to all of its questions (regardless of type), then each question to its appropriate details?tblLikertDetails ID RatingType(PK) 101 Numeric_Rating 102 Agree_vs_DisagreetblMultChoiceDetailGroupings ID 50 51 52tblMultChoiceDetails ID(PK) Group(FK) Text 20 50 < $100 21 50 > $100 22 51 Breakfast 23 51 Lunch 24 51 Supper 25 52 Omaha 26 52 Phoenix 27 52 Dallas