im building a new form builder application and im im struggling with a question for few weeks now. my question is about the data model for submissions.
ill explain my needs now. 1- the ability to store submission in a way that will allow me fast edit, and fast select(like a spreadsheet of all my submissions) 2- support millions of forms with billions of submissions
there are 4 approaches for this
using RDBMS:
1- build dynamic table for each form, store each form submissions in it and you PROS : an easy way of select, updates and inserts. CONS : dynamic sql is not safe, millions of tables
2-store all submissions in a single submission table SubmissionTable : fields :: formid,submission json PROS : single table, easier for db to manage,easy to insert CONS: hard way to select(filter), update specific field, HUGH TABLE
3- EAV model i can do an eav model with few data types mapping so each data type will be stored in a relevant field type that will help to doa better selects PROS and CONS are quite like #2
the second option is to use a MONGODB/CASSANDRA and store each submission as a document here, im lack with experience so i cant cover this good.
i wonder what do you think of this ? what is the prefered way of storing the submissions so ill be able to easily export it and select from it based on the dynamic fields i got ?
thanks!
Aucun commentaire:
Enregistrer un commentaire