使用 PHP (5.3) 编码的面向对象内容管理系统应使用哪种数据库类型?
我和我的一个朋友刚刚开始了一个自己的项目,以了解最新和最未来相关的网络技术:我们决定构建一个自己的面向对象的内容管理系统,具有增强的功能,例如该网站上的社区积分功能。
使用 PHP 作为开发语言,MySQL 作为数据库(这似乎是互联网上所有内容的标准数据库解决方案),我们很快就在将对象保存到数据库中时遇到了麻烦,尤其是对象之间的引用。作为第一个解决方案,我们使用了我们现在所知的被称为“关节”的桌子。
但后来我开始研究如何解决这个问题。这是我发现的:
- 有针对关系数据库的面向对象的映射解决方案,也适用于 MySQL 和 MySQL。 PHP
- 有一个专门为解决这个特定问题而设计的特殊数据库模型:面向对象数据库
- 对象关系数据库,一种混合模型,基本上是具有特殊功能的关系数据库。 我提到的并且您从其他地方知道的所有解决方案中,
由于我不想再开始一场关于最佳数据库模型的辩论,所以这是我的具体问题:
哪一个是得到足够多的支持的解决方案并且网络存储不太昂贵提供商并且对于“基本”面向对象功能来说足够好,因此是实现面向对象内容管理系统的不错选择? (再说一次,到目前为止我们遇到的最痛苦的事情是缺乏引用数据库中的其他对象。)
非常欢迎关于特定数据库类型的建议!
A friend of mine and I just started an own project to learn about the newest and most future relevant web techniques: we decided to build an own object-oriented content management system with enhanced functionality like the community-points function on this site.
Using PHP as developing language and MySQL as database – which seems to be the standard database solution for everything on the internet – we quickly got into trouble saving our objects into the database, especially the references between objects. As a first solution we worked with table that - as we know now - are called "joints".
But then I started a research on how to solve this problem. Here's what I found:
- there are object-oriented mapping solutions for relational databases, also for MySQL & PHP
- there is a special database model designed for solving this particular problem: the object-oriented database
- the object-relational database, a hybrid model that basically is a relational database with special handling for object savings
Since I don't want to start one more best-database-model-debate, here's my specific question:
Which of all solutions I have mentioned and you know from elsewhere is the one that's well supported from enough and not too expensive web-storage providers and is good enough for "basic" object-oriented functionality and thus be good choice implementing an object-oriented content managment system? (Again, the most painful thing we have crossed til now is the lack of referencing other objects in the database.)
Recommandations on particular database types are highly welcome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试任何“NoSQL”数据库,它们不是关系型的。例如,MongoDB。 Mongo 以 BSON 格式存储数据,类似于 JSON,在 PHP 中您可以轻松处理 JSON 数据。您可以在 http://nosql-database.org/ 找到有关 NoSQL 数据库的信息,并查看有关 MongoDB 的信息以及 http://en.wikipedia.org/wiki/MongoDB
You can try any "NoSQL" database, they are not relational. For example, MongoDB. Mongo stores data in BSON format which is like JSON and in PHP you can easily handle JSON data. You can find information about NoSQL databases at http://nosql-database.org/ and take a look about MongoDB as well http://en.wikipedia.org/wiki/MongoDB