I have wondered about my current database design I made for my uni organization website. In general this website is for displaying informations and events. The event is different for each departement. It does some normal things like displaying event, creating event for admin, event registration for user, etc. The problem is every departement may have different form for registering new participant, say departement A has 5 form input, but departement B has 8 form input. And yet, every event may have different total of form with multiple type like text, radio or checkbox.
To solve the problem I mentioned before, I designed the database that has events
, departements
, event_forms
, form_types
, event_form_options
(for checkbox or radio when admin decided to choose that type of form), event_form_responses
, and some other tables that is out of the context of this question. The thought process I had, that admin can create whatever amount of form input they want, and each form input equals one row of event_forms
table that refers to certain event
with event_id
. But the "problem" that might occurs with this approach lies in event_form_responses
table. In that table, user will have response for each form input of certain event. Say, event A
has 10 form inputs, and then 60 people decided to register to that event, that means event_form_response
will have 600 rows of response for that event alone!. And then it needs to be displayed in admin dashboard.
My question:
Will that impact query and website performance? I think it will. What if I change the event_form
and event_form_responses
to store it as a JSON instead? Is it more advantageous at this point?. So that every event_form
can have different signature with different amount of form inputs easily. And for the event_form_responses
will have 1 * U
instead of Q * U
, which U
is total of user registered in said event, and Q
is amount of form inputs. Thank you in advance