配置设计数据库和管理器

发布于 2024-11-08 05:56:32 字数 299 浏览 3 评论 0原文

我目前正在开发一个系统,我希望它是高度基于配置的,基本上从那个管理面板我想要一个围绕数据库结构设计的配置系统。

我正在寻找一种设计数据库的好方法,以便我可以拥有不同类型的可配置值,例如多可选值(下拉)、布尔值 - 开/关值(单选框)、基于文本的值等。

是否有您可以建议高效且干净的方法。

到目前为止我还没有开始任何事情,因为我不想走错方向,这就是为什么我征求你的建议。

  • 该系统是使用 PHP 和 PDO(基于 MySQL)构建的,
  • 具有基于 MVC 的架构

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 architecture

Regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

方圜几里 2024-11-15 05:56:32

我已经在专用框架中完成了此操作,这就是我的做法:

  • 名为 extra01 到 extra20 的 20 个列数据
  • 类型是字符串,您可以将任何
  • 需要存储列类型的字符串放入某处,具体取决于您的系统粒度。我将它们存储在 xml 文件中,因为额外的列类型特定于每个项目。

这就是 Microsoft Project 的工作原理。这很简单而且有效。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文