PHP ORM with NOSQL and RDBMS support

2019-08-21 03:00发布

问题:

Are there any PHP ORM projects which supports MySQL and NoSQL databases such as MongoDB?

I am currently using RedBean to do MySQL ORM, however I woud like to introduce MongoDB to the applicatoin and perhaps even replace some of the MySQL with MongoDB in the future.

An ORM that can allow me to easily transition between both would be nice. However, I tend to not like ORM that requires too much configuration (i.e. YAML, XML etc). RedBean is very nice in that it allows one to easily get things working without too much configuration.

回答1:

Yes, doctrine supports various RDBMS and NoSQL storages as well



回答2:

Docrine 2 contains both an ORM and ODM for NoSQL databases (MongoDB and CouchDB are supported), and its theoretically possible to hook up Doctrine to anything else.



回答3:

We're working on some adapter-based ORM called UniMapper in our company.

It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. You can even associate between entities from different storages. And it should be even faster than Doctrine. Try it give us some feedback :-).

MongoDB will be supported very soon, but you can write extension on your own, it's very easy.

However the quick start is not complete, you can ask me or somebody from our team.