mysql - storing allowed settings combinations -


i making interface user can define settings. settings separated in categories , user can select 1 parameter each category. thing is, combinations of parameters allowed , must prevent users selecting incompatible parameters.

i trying design mysql database structure did not find solution satisfies me.

what thought of :

categories   - id  - description  parameters  - id  - parent category id  - description  combinations  -id  - string concatenation of parameters ids ordered category 

eg. : 102596 combination of parameters 10 category 1, 25 category 2, , 96 category 3.

the problems : if 1 day need more hundred parameters ?

ok have these tables:

categories   - id  - description 

and each category has multiple parameters:

parameters  - id  - parent category id  - description 

now want store parameters user has selected. why dont handle operation of permitting of selecting 1 parameter per category outside of database design scope? if can that, combination table simple:

combinations  - id  - user_id  - category_id  - paremeter_id 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -