I know that there is already an answer for a similar question but I think that the answer is not strong enough, so I'll ask with my own specific issues.
assumption: dynamic form builder, users can create form with structure which is not known.
solution: Form submission, data will be stored in a 2 table structure:
- FormSubmissionHeader table that will store some basic data about the submission(formid,userid,datetime,etc)
- FormSubmissionFieldsData(FormSubmissionHeaderID ,FIELDID,FIELDVALUE)
My problem with this solution is with mass usage:
Assuming I got 1 million users,
each user will have 3 forms
each form will have 10 fields
and each form will have 5 submissions per day.
So the FormSubmissionHeader will grow in 1 million X3X5 per day = 15 million rows per day.
and FormSubmissionFieldsData wil grow by 15X10 (number of daily submission, double number of fields), meaning 150 million rows per day.
So based on this solution:
I don't see how it is going to work.
I see two alternatives :
use MONGODB to store submissions header and data (NO SQL)
dynamically create table per form and store the data directly there with relevant datatypes per field.
This is a similar question which I saw..
Wufoo's Database Schema - How would you design it?
I wonder what do you guys think of it or can you suggest something else?