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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
As per my knowledge mongoid would be best adapter for Mongo. From: Mukesh Singh <mukesh23.singh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Reply-To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Date: Wed, 9 Nov 2011 11:44:45 +0530 To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 09 Nov 2011, at 07:14, Mukesh Singh 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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. 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 < rameshwar-RurJdf2q/3b81YoFknqbq1pr/1R2p/CL@public.gmane.org> wrote:> As per my knowledge mongoid would be best adapter for Mongo. > > From: Mukesh Singh <mukesh23.singh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Reply-To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > Date: Wed, 9 Nov 2011 11:44:45 +0530 > To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.