开发者

Configuration Design DB and Manager

开发者 https://www.devze.com 2023-03-07 07:18 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号