Link to home
Start Free TrialLog in
Avatar of flynny
flynnyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Database Design Help

Hi All,

I would assume something like this already exists, so if someone could point me in the right direction I would appreciate it.

I am looking at creating a dynamic form for a small questionnaire that a user will fill in when they complete an installation.

Now we want to be able to potentially ammend and change the forms as time goes on but maintain any existing competed forms.

We also want the flexibility of building different types of questions, so examples would be;

- single text answer (text)
- single multiple choice (radio)
- multiple selection multiple choice (checkbox)
- slider (values)
- image (possibly multiple) uploads (to be stored as blobs in the db)

So far I have the following idea drafted

Form Table -
ID - PK Int
Title- String
Active - Bit

Section
FormID - Int PK FK to Form -> ID
SectionID - Int PK
Title - String
Active - Bit

SectionQuestion
SectionID - Int
QuestionID - Int

Question
ID - Int
Type - Int FK to QuestionType -> ID
Title - String

QuestionType
ID - int
Type - String

QuestionOption
QuestionID - int
OptionID - int

Option
ID - Int
Option - String

QuestionAnswer
QuestionID
AnswerID
InstallationID

Installation
ID - Int
Status - Text

I maybe over complicating this though? any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flynny

ASKER

Thanks for all the help guys!