Last post Apr 03, 2015 05:49 AM by Mikesdotnetting
Apr 03, 2015 02:29 AM|kannadasbe|LINK
I am building a dynamic app.
The basic of the app is i can create a question. A question may have many columns. These columns will be displayed in table structure. Then the user will fill the details. Below is the sample.
Question: 1. List the projects available and their deadlines?
Columns: 1. Project - Textbox 2. Deadline - Textbox
So i will show this data in the table like below.
The user will fill the row and click on submit button. Another empty row will get added to add the another response like below.
The user will submit any no of responses.
Like this the no of columns will be dynamic and also the each column will have some validation like Unique,AcceptsNull etc...
How to create table structure in ms sql server to save the question,column and the responses.
Please help thanks in advance..
Apr 03, 2015 05:49 AM|Mikesdotnetting|LINK
This is how I would structure it:
QuestionId int PK
QuestionDetailId int PK
QuestionId int (FK on Question.QuestionId)
DataTypeId int (FK on DataTypes.DataTypeId)
DateTypeId int PK
ResponseId int PK
QuestionDetailId int (FK on QuestionDetails.QuestionDetailId)