MySQL Hierarchical Structure -


every single user has say, 3 of group_a, 10 group_b's per group_a, , 20 group_c's per group_b. , each of 20 group_c's involve lots of inserts/deletes...and every piece of data unique 1 groups/users.

i'm not expert, i've done research it's theoretical @ point of course, , don't have hands on experience implementation that's sure. think options 'adjacency lists' or 'nested sets'?

any guidance right direction appreciated!

(i posted on dba stackexchange i'd appreciate if more opinions , community!)

i know trivial solution have simple tables foreign keys parent 'container' i'm thinking in long term, in event there's million users or so.

i know trivial solution have simple tables foreign keys parent 'container' i'm thinking in long term, in event there's million users or so.

i go approach. long number of hierarchy levels remains fixed, resulting scheme scale because trivial. fancy table structures , elaborate queries might work enough small data sets, large amounts of data, simple structures work best.

things lot more difficult if number of leverls might vary. if want prepared such cases, devise different approach, scale badly if amount of data increases.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -