Link to home
Start Free TrialLog in
Avatar of J N
J N

asked on

database structure for storing application module options

Hi,

I would like to offer users to be able to toggle modules on/off as well as various options for each module.

I'm not sure what the best method to accommodate this?

i have considered
  1. creating a separate table for each module. Each table would have some similarities but I could add/remove columns for each specific module setting. There would be some redundancy
  2. create a table which would include all modules and its related options. create a second table which would list specific options and use an option id and player id to tie the two together. If there is no database value the default setting would be used

I have included a copy of a proposed options, they are limited as I haven't developed the ability to toggle them.

there are approximately 26 modules and they are all unique(of the 26 only about 10 would include options)
modules.png
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of J N
J N

ASKER

are there any other options i may not have considered?

why do you think this is a better alternative?

also i neglected to mention that i would be continually adding modules
why do you think this is a better alternative?
Because that's a database design method called Vertical Partitioning (partitioning by columns and not by rows). You can also add to the main table the columns that even isn't necessary for all modules, they exists for the majority of them, like for example 20 out of those 26 modules.

also i neglected to mention that i would be continually adding modules
That's why you should go for that solution. Try to keep it the more static possible.