I am considering using MongoDB on a site for field storage, and not just moving cache, session, lots, etc., out of my SQL database.

The Field Storage API should make this seamless, assuming I am using the Drupal API for accessing data. But, does this limit my site in any way. In particular, I am wondering how Views will be affected.

  • This will most likely get closed down as being too broad, however; the only thing that has kept me away from MongoDB is that fact that I would lose Views' relationships functionality for fields stored using MongoDB. I am concerned that one day I'll need it and BANG - none of the queries can be JOINed. – Chapabu Sep 6 '13 at 15:03
  • That is one of the things that came to mind. – Jacob Bolton Sep 6 '13 at 15:05
  • @Chapabu You can mitigate that with Mongodb and EFQ Views Backend – Clive Sep 6 '13 at 15:47
  • @Clive Are you sure? I was sure I read somewhere that this was not the case? I've never had the time to try it - so I can't 100% say either way. If it works then hell, I can't see any reason not to use it :-) – Chapabu Sep 6 '13 at 15:54
  • 2
    I think this can be rewritten to give it focus, and be a good fit fot the site. – mpdonadio Sep 6 '13 at 15:54

its a cool question.

Im on my 5 week adventure of playing around with Drupal 7 and mongo,

However as Cahpabu stated and quoted.

NO RELATIONSHIPS WHATSOEVER. EFQ Views do not support relationships because Mongo doesn’t support JOINs." - Under the Converting the Views section on this post. (Just to clarify, I'm not being argumentative, I'm genuinely curious) – Chapabu Sep 6 at 15:57

I think you can do a lot using mongo with Drupal, moving a lot of other stuff into mongo, like sessions, etc. simple "fields" however :

Since Views is extremly limited with Mongo db. I found out that its better(and much more timeconsuming) to rewrite some custom modules fitting into the schema of mongo.

So its for sure, a great adventure if your starting up a new project/site. But the adventure will be filled with great challenges down mystery lane.

Even the Whitehouse had to go back to Mysql from mongo. here is a quote I found on it.

"The current release depends on MongoDB. When we first created the application, we wanted to make sure we had a highly scalable application and database to meet our anticipated performance needs under high loads. We have been running MongoDB in production for over a year, but we have decided that the performance benefits it provides are outweighed by the complexity of trying to extend Drupal features backed by MongoDB."

However other people had great succes with mongodb and Drupal 8 Mongodb and Drupal 8

As they state in their slide, To achieve full mongodb functionality is of course impossible.

But you will have to give up several modules using SQL, (which is a lot) For now, I still have the feeling that Drupal cant dance a full tango with Mongo. Even using the modules. its still a rough way.

  • Thanks for sharing your thoughts on this! It's appreciated! – Jacob Bolton Oct 10 '13 at 20:07

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.