This document discusses using multiple databases together in a Rails application. It describes initially using MongoDB with Mongoid for objects but finding that a relational database is better suited for other models with relations. The solution presented is to use Mongoid to store objects in MongoDB but query relations through ActiveRecord to a SQL database, allowing the benefits of both types of databases to be utilized. Code examples are provided showing how this approach reduces the number of queries needed.