Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm looking for a PHP Active Record library that supports both SQL and NoSQL drivers (mongodb in particular). It doesn't matter if it actually has the NoSQL driver, I can write it myself, as long as the library itself supports it.

In particular I'd need one that supports writing custom AR methods in the driver, in case they are methods that simply cannot be transferred to other drivers.

The reason I want this is because I'd like to be able to talk to my databases the same no matter the driver, this will allow me to fairly easily transfer my data between different databases for performance testing.

I'm not sure if this is the right place to ask for this, if not I apologize and would love to know what stackexchange site would be appropriate.

For the record, I HAVE googled it, and all I can come up with is AR libraries for SQL databases, I haven't found a single one that combines SQL and NoSQL.

Thank you.

share|improve this question
    
Your requirement that you be able to write custom AR methods on the driver that can't be transferred to other drivers is incompatible with your goal of portability across drivers. –  Rein Henrichs Jun 15 '11 at 16:37
    
The custom AR methods only apply to a very small percentage of the code that will be using the library. There are some queries that simply have to use custom methods, which will have to be adjusted depending on what database I use. Point is the library shouldn't force me to limit myself. –  Naatan Jun 15 '11 at 16:45

1 Answer 1

Chances are good that Doctrine2 will support NoSQL in the future. Read the slides about it here: http://www.slideshare.net/beberlei/doctrine-for-nosql

As Doctrine2 isn't an active record implementation but an ORM, you might be out of luck if you strictly need an active record implementation (however, you can build an active record implementation on top, discussed on http://www.doctrine-project.org/blog/your-own-orm-doctrine2). However, if you are more flexible, Doctrine2 will be your best friend.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.