Multi-Tenant Rails 3 App on Heroku using PostgreSQL
问题 I have a multi-tenant app on Heroku (multiple Accounts that know nothing about each other), and I'm unsure as how to best architect my database. Postgres's schemas look awesome, but heroku doesn't handle large numbers of them well. Now, my Rails app is mainly serving JSON, as most of the templates are rendering client-side (using Backbone.js). So I'm considering moving to MongoDB because 1) each tenant could get one top level 'account' document, and everything could be nested below and 2) its