PHP 友好的 NoSQL 解决方案

发布于 2024-09-01 11:50:53 字数 218 浏览 8 评论 0 原文

我希望在我的下一个项目中使用 NoSQL 解决方案,该解决方案将用 PHP 编写。对于可以通过 PHP 轻松连接的 NoSQL 解决方案,我有哪些选择?我还没有对架构进行太多思考,所以我不确定我的需求是什么;我只是想知道我的选择是什么,这样我就不会构建一些我无法合理实现的东西。

例如,我知道 Cassandra 有 Pandra,但这只是一个 PHP 库。 MongoDB 有一个原生的 PECL 扩展。

I'm looking to use a NoSQL solution for my next project, which will be written in PHP. What choices do I have in terms of NoSQL solutions that can easily interfaced via PHP? I haven't done much thinking about the architecture yet, so I'm not sure what my needs will be; I'd simply like to know what my choices are so I don't build something I can't reasonably implement.

For instance, I know Cassandra has Pandra, but that's just a PHP library. MongoDB has a native PECL extension.

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

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

发布评论

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

评论(4

并安 2024-09-08 11:50:53

我为 MongoDB 编写了 PHP 驱动程序,我认为这是一个很棒的接口 :)

mongo PECL 包不仅非常成熟(相对而言......现在已经有近一年半的历史了!)而且相当彻底 记录,它确实被广泛使用。如果您查看 MongoDB 的 PHP 页面,您会发现有多种方法可以将其与Cake、Doctrine、Drupal、Kohana、Symfony 和 Zend,以及一些管理 GUI(例如 PHPMoAdmin )以及它自己的几个 ODM(对象文档映射器)。

PS salathe 有一个很好的观点,不过,最好的解决方案实际上取决于你在做什么。

I wrote the PHP driver for MongoDB and I think it's a great interface :)

The mongo PECL package is not only pretty mature (comparatively... nearly a year and a half old now!) and fairly thoroughly documented, it is really widely used. If you check out MongoDB's PHP page, you can see that there are ways of integrating it with Cake, Doctrine, Drupal, Kohana, Symfony, and Zend, as well as a couple admin GUIs (like PHPMoAdmin) and several of it's own ODMs (object document mappers).

P.S. salathe has a good point, though, the best solution is really going to depend on what you're doing.

埋葬我深情 2024-09-08 11:50:53

CouchDBPHPillow

PHPillow 是 CouchDB 的面向对象包装器。可以在下载页面上找到版本。 Apache CouchDB 是一个分布式、容错且无模式的面向文档的数据库,可通过 RESTful HTTP/JSON API 进行访问。除其他功能外,它还提供了强大的增量复制功能,具有双向冲突检测和解决功能,并且可以使用面向表的视图引擎(以 JavaScript 作为默认视图定义语言)进行查询和索引。

另请参阅 http://nosql-database.org 以获得良好的概述。

CouchDB has PHPillow:

PHPillow is an object orientated wrapper for CouchDB. Releases can be found on the downloads page. Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API. Among other features, it provides robust, incremental replication with bi-directional conflict detection and resolution, and is queryable and indexable using a table-oriented view engine with JavaScript acting as the default view definition language.

Also see http://nosql-database.org for a good overview.

我ぃ本無心為│何有愛 2024-09-08 11:50:53

NoSQL 解决方案

你的问题非常模糊,无论你是否有意。如果不知道您想要摆脱 NoSQL 解决方案,那么任何建议都只是指名道姓(不一定是坏事,但没有什么是您无法在几分钟内 Google 自己的)。例如,您上面提到的两个(Cassandra 和 MongoDB)是不同的动物:基于友好性进行选择似乎有点短视。

那么,您能否考虑一下,然后来详细说明该项目(无需透露细节;一般方法、需求和愿望等),以帮助我们帮助您做出选择?

PS 这只是一个“答案”,因为评论太长了。华夫饼手指!

PPS 这并不意味着什么,但我非常喜欢 MongoDB……无论是 PHP 还是其他语言。

a NoSQL solution

Your question is very vague, whether you intended it or not. Without knowing that you are wanting to get out of the NoSQL solution then any recommendations would just be naming names (not necessarily a bad thing, but nothing that you can't Google yourself in a few minutes). For example, the two that you name above (Cassandra and MongoDB) are different animals: to base the choice on friendliness seems a little short-sighted.

So, could you have a think about it, then come and elaborate on the project (no need to divulge details; general approaches, wants and desires, that sort of thing) to aid us in helping you move towards a choice?

P.S. This is only an "answer" because it's too long for a comment. Waffley fingers!

P.P.S. Not that it means anything, but I am quite the fan of MongoDB... with PHP or otherwise.

-小熊_ 2024-09-08 11:50:53

我自己还没有尝试过,但它在我的待办事项列表上:尝试 mongo 与 php

I have not tried it yet myself, but it's on my to do list: trying out mongo with php.

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