I am creating an application where users can create forms with many fields of text, numeric, date and select types.
- The model will have a
forms
table referenced byresponses
table; - It also have the
fields
table with 'name', 'field_type' - it points toforms
too; The filled data will point to
responses
and tofields
, but how should I model it:- A table for each field_type? (tables: text_fill, num_fill, date_fill, sel_fill); or
- One table only with a column for each field_type where only one will be filled on each record?
My doubt is about performance, disk usage and industry standards. Can anyone clarify it to me with data?
Note 1:
This is not a duplicate of Creating a online database creator because that question is about a generic database creator, and this questions is about form creator, which is bounded to an existent database model, which will be expanded by those forms
, those bounded or by a single user or by a service that uses this database. Plus the answer on that question don't answers mine.