If you are using Rails, have a look at using PostgreSQL schemas. Single "physical" database but the schemas give you distinct logical databases. Perfect for multi-tenant situations.
I think a lot of companies that provide hosting services of open source software follow this model. They'd probably be the best example for the OP to refer to in their search for relevant designs. I think ghost blog follows this model even when you self host. So a single machine can host multiple blogs and each blog creates their own random named schema.