|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, April 21, 2013 8:02 PM
Points: 38,
Visits: 429
|
|
Hi,
I am designing survey database and for one entity I need to store dynamic field's Name and his data this data will change for each survey.
So, For this I have created one table with 8 fields of different datatype 3 varchar, 3 Int and 2 DataTime.
Now, user can use these fields to upload the data. Before upload they will define the field names for the specific survey, And ensure that data type of the value should matches with the field data type.
Ex: For survey 1 if user want to upload Age, Networth and profession data then user will select 2 Int and 1 varchar field and define the fields as Age, Net worth and Profession
Current table design is as follows:
Field_Name_master:
Id Int Fk_Survey_Id Int Field1 Varchar Field2 Varchar Field3 Varchar Field4 Int Field5 Int Field6 Int Field7 DateTime Field8 DateTime
Fields_Data Table:
FK_Field_Name_Master Int Field1 Varchar Field2 Varchar Field3 Varchar Field4 Int Field5 Int Field6 Int Field7 DateTime Field8 DateTime
Can any one suggest the best practice for this type of table design?
|
|
|
|