I need to design database schema where number of columns and type can can vary depending on some attribute(say category). So basically I have one super class which will have some common attributes and sub class(for each category) will extend this class. After some research I have some solutions and want some suggestion which will be better?
- Use NoSQL and create one table with all the attributes(of all category)
- Use EAV model
- Use Json data type in MySQL 5.7
- Create table for each subclass(category)
Requirements: All the data will come from user input/ forms. There will be around ~15K entry per day and number of categories will increase with time but not so much. I need to fetch some data (of a particular time range) related to each category and then show it one common dashboard. So If I use last approach then I need to join on all category tables and this will slow the process. I have read about using Json type in MySQL and till now I didn't get such down side of this method. With NoSQL keeping all fields in one class doesn't seem good idea to me because some attributes will be totally unrelated and in EAV model some simple queries will become more complicated.
I know this is general scenario but I really don't know with which approach I should go? Let me know if any more information is needed.