Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store custom user fields in database

I am trying to find a tutorial that will guide me on how user based custom fields works. Like in surveys sites, where they let users create custom fields and store them and more importantly store the data entered through those fields.

I am looking for something that describes how this is done on database. I am having a little trouble finding a way that would not take forever retrieving this data once the users whats to extract it to excel/cvs files.

like image 855
Ridvan Avatar asked Nov 11 '10 04:11

Ridvan


1 Answers

The Entity-Attribute-Value model is normally used to handle this scenario in a relational database. A quick search for "EAV model" will yield more info than you'll know what to do with.

like image 158
BenV Avatar answered Sep 21 '22 19:09

BenV