php - Handling table attributes/properties using CakePHP and MySQL -


first of all, happy new year :-)

i think question obvious programmers didn't manage find answer.

let's have customer table , customer have attributes (properties). don't want add new field in customer table every time add new attribute. moreover, customers don't have same number of attributes.

all know each attributes known in advance (some day, add 'referer', 'age', 'type_of_prefered_food' .... attributes not mandatory, customers may fill information or not).

my question is, best way manage using cakephp 3 , mysql ?

having customer hasmany attributes (if think in case have have constant list of each properties id)

or

having customer belongstomany attributes (so, through relation table)

knowing that, best : having attribute id referenced integer or string ? how retrieve specific property ...

my question cakephp oriented, want know if 1 approach easier work with. there cakephp tools/function/library me retrieve/add/edit attributes specific customer ?

the best question managed find : how pivot mysql entity-attribute-value schema

thanks in advance having time respond.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -