Would an EAV model work? I'm thinking something like <form,field,value>. For example:
formA,ckbox1,true
formA,input1,initial value
formB,textarea1,enter your long comment here
You could easily extend this to <user,form,field,value>, or normalize it as you see fit.
This would work great too. If we go this route, we'll keep it simple and use the <user_id, report_id, field, value>, as you suggested, where user_id and report_id are foreign key references.
Another possibility is to use hstore hashes for form fields/values. See
http://www.postgresql.org/docs/8.3/static/hstore.html
I will look into this too. But we'll have to upgrade to 8.3 which is not a problem.
Thank you Reece.
Dianne
No comments:
Post a Comment