I am working on an application which records data from different forms. New forms can (and will be) constructed dynamically by an admin. I am wondering what would be the correct way to save this data in a database? My first guess would be to use EVA, but considering all the bad publicity I am a bit hesitant.
Let's say I have two forms:
#form 1
description = TextField()
score = IntegerField()
#form 2
feedback = TextField()
NOR_score = IntegerField()
There is no way of predicting the number of possible attributes. I am playing around with two ideas, but maybe you'll be able to suggest a much better approach.
Idea I:
unique_id | entity | attribute | value
1 | form 1 | description | test123
2 | form 1 | score | 90
3 | form 2 | feedback | blabla
4 | form 2 | NOR_score | 5
Idea II:
unique_id | entity | value
1 | form 1 | {"description": "test123", "score":"90"}
2 | form 2 | {"feedback": "blabla", "NOR_score":"5"}
Thanks in advance for any suggestions.