Does it make sense to use BOTH mongodb and mysql in the same rails application?
mongodb, mysql, ruby-on-rails
Solution
That's what we do with CouchDB and PostgreSQL.
All our users and groups kinds of things are in the postgresql database. Anything else (in our case, some records with statistical datas) are in the couchdb database.
In our case, it allows us to have one couchdb database per client (the app connects itself to one or an other depending of the user's host). And only one postgresql database having all the users in it.
So yes I think it's a good idea to have a SQL and a NOSQL database in the same application.
Problem
I have a good reason to use MongoDB for part of my app. But people generally describe it as not a good fit for "transactional" applications like a bank where transactions have to be exact/consistent, etc. Does it make sense to split the models up in Rails and have some of them use MySql and others mongo? Or will this generally cause more problems than it's worth? I'm not building a banking app or anything but was thinking it might make sense for my user's table or transactions table (recording revenue) to do that part in MySql.