Configuration Design DB and Manager
Im currently working on a system that I want to be highly configuration based, basically from that administration panel I want a configuration system designed around the database structure.
I am looking for a good way to design the database so that I can have different types of configurable values such as multi selectable values (drop down), boolean - on/off values (radio boxes), text based values etc.
Are there any ways you can suggest that's efficient and clean.
I haven't started anything so far because I do not want to go in the wrong direction, this is why i ask for your advice.
- The system is built using PHP and PDO (based around MySQL)
- Has an MVC based architec开发者_如何学Goture
Regards.
I have done this already in a dedicated framework and here is how i did it:
- 20 columns named extra01 to extra20
- datatype is string, and you can put anything in a string
- you need to store the types of the columns somewhere, depending on your system's granularity. I stored them in xml files, as the extra columns types were specific for each project.
This is how Microsoft Project works. It's simple and it works.
精彩评论