I was thinking of storing it in json. When I load...
# off-topic
t
I was thinking of storing it in json. When I load
/profile/
I fetch the fields and the blob of json, and template thatt back out as a quiz. Does that sound like a sensible thing to do?
s
This will be up to you and how you plan to use the data, if the data will always be requested from the user then you can do it this way, but if you ever wanted to get all surveys and then do something else with it, it's best to store in a separate table with a
user_id
column in that table
I mainly store stuff in separate tables if I'm going to use them separately at times, but if its closely related to the profile then I store it in a jsonb column, but I also try to keep this at a minimum (just personal preference)
t
Awesome! Great rundown — thank you very much!