I'm very big fan of CouchDB. I want to try Drupal, but it doesn't have built-in CouchDB support, and i guess it is not easy to add one, because Drupal's DB layer was designed for SQL-based databases. I found only one attempt to add CouchDB support but it is experimental. Is there any successful cases of using Drupal with CouchDB? Or i should ultimately give up on this issue?

There is also MongoDB support, but i just wanted to know all variants.


There are a few things to keep in mind.

Even though Drupal support multiple databases (mainly MySQL, PostgreSQL, and now anything supported by PDO), this is only true of the core files. There are contributed modules that use database specific syntax and/or functions. In addition, there are some functions that show subtle differences when run on different database servers (for example, see Does db_affected_rows() works well with PostgreSQL?).

The modules for non-SQL databases are primarily for offloading some core tables from the primary database. You still need an SQL database when using these.

Personally, I don't mess around with any of these other databases. I may start experimenting with MongoDB, but I can't really use it with client's projects as its support on commodity hosting is limited. Setting it up for them would eat into their budgets, and clients would rather have me do Drupal work than IT work.

  • Shouldn't the contrib modules rely strictly upon database-agnostic layer by convention? Using exact database makes Drupal inflexible, no? – Mirzhan Irkegulov Nov 26 '11 at 18:47
  • It is not as much the DB API, as it is modules using MySQL specific features in queries. I have seen it mostly with modules that use custom queries and use MySQL-only functions (mainly aggregate functions). Also read the link in my answer. Even with the full abstraction, there are quirks like that. – mpdonadio Nov 26 '11 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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