Forum: Ruby on Rails using mongodb with ActiveRecord or other ?

71477e5162d702dae2a072d66a855fec?d=identicon&s=25 wbsurfver@yahoo.com (Guest)
on 2013-10-17 16:11
(Received via mailing list)
We recently looked at mongoDB a bit. I was discussing using mongoDB with
active record but was told that maybe there are other or better options.
Can someone comment on that ?

 Also, someone suggested storing a ruby array directly inside of a
record
where I would have opted for the array to be a separate set of records
in
active record using has_many and belongs_to .. It seemed to me that how
I
search on those child records would be a big factor but I soon realized
I
need to find out what are the options. Do people store arrays and hashes
directly in mongo DB fields or is that not the best way to go ?
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2013-10-18 08:50
(Received via mailing list)
On Thursday, October 17, 2013 3:09:33 PM UTC+1, wbsu...@yahoo.com wrote:
>
>
>  We recently looked at mongoDB a bit. I was discussing using mongoDB with
> active record but was told that maybe there are other or better options.
> Can someone comment on that ?
>
> ActiveRecord is pretty hardwired to SQL databases. Mongoid and mongomapper
are 2 ORMs that wrap mongodb documents with an ActiveModel compliant
interface


>  Also, someone suggested storing a ruby array directly inside of a record
> where I would have opted for the array to be a separate set of records in
> active record using has_many and belongs_to .. It seemed to me that how I
> search on those child records would be a big factor but I soon realized I
> need to find out what are the options. Do people store arrays and hashes
> directly in mongo DB fields or is that not the best way to go ?
>

It's certainly a compelling feature. There are pros and cons.  It
depends
largely on how you use/access the data. For example with data in
separate
records, its difficult to update a parent and child without race
conditions, since while individual document updates are atomic there are
no
transactions. Equally very large documents can be unwieldy

Fred
A933478cf3b20c2cb3820e163cf408c8?d=identicon&s=25 John Smith (sql5)
on 2016-04-14 14:22
Hello
Its too late. If you have any other query regarding MongoDB visit the
link:
https://zappysys.com/blog/ssis-loading-data-into-m...
Here discussion are carry on regarding mongodb or many other topics.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.