Mongo adapter

I have setup mongo database and want to know which one would be best
adapter ( mongo_mapper , mongoid, dm-mongo-adapter ) in terms of
Associations, include option for eager-loading .


Regards
Mukesh Paras Singh

On 09 Nov 2011, at 07:14, Mukesh S. wrote:

I have setup mongo database and want to know which one would be
best adapter ( mongo_mapper , mongoid, dm-mongo-adapter ) in terms
of Associations, include option for eager-loading .

You’re asking which adapter is the best for turning MongoDB into a
relational database. That’s not what MongoDB (or any embedded document
based database for that matter) is for and it will kill performance if
you rely on associations between non-embedded documents. You CAN use
an association here and there, sparsely, but it should be the
exception rather than the rule.
So, if your application depends on a lot of foreign key associations,
use a relational database instead (PostgreSQL, MySQL, ) and don’t
jump on a document-oriented database just because it sounds nice.

Now, back to your original question, if a document is embedded (which
for MongoDB is more or less the equivalent of a join, albeit in a very
very different way), it will get loaded with the record anyway, since
it’s an integral part of it. All the adapters you mentioned will do,
it depends on which syntax you prefer most. I prefer Mongoid, my
colleague likes MongoMapper better. They do both have their strengths
and weaknesses (a simple google search for “mongoid vs mongomapper”
will give you all the info you need). MongoMapper will probably be
YOUR best bet since it stays a lot closer to activerecord relational
paradigms, but at the same time it might fuel your old relational
habits.

Best regards

Peter De Berdt

As per my knowledge mongoid would be best adapter for Mongo.

From: Mukesh S. [email protected]
Reply-To: [email protected]
Date: Wed, 9 Nov 2011 11:44:45 +0530
To: [email protected]
Subject: [Rails] Mongo adapter

I have setup mongo database and want to know which one would be best
adapter ( mongo_mapper , mongoid, dm-mongo-adapter ) in terms of
Associations, include option for eager-loading .


Regards
Mukesh Paras Singh


You received this message because you are subscribed to the Google
Groups
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Thanks for suggestions.I have decided to use mognoid

On Wed, Nov 9, 2011 at 11:55 AM, Rameshwar Vyevhare <
[email protected]> wrote:

adapter ( mongo_mapper , mongoid, dm-mongo-adapter ) in terms of
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Regards
Mukesh Paras Singh