Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For my web application with a postgresql backend I'm now looking into schema's. As I switched from MySQL to Postgresql(because of (amongst others) the proper geospatial extension) I was not aware of the concept of schemas.

In my application every customer now has his own database with tables and off course content. The user management and authentication is done with an 'oversight' database. This makes it possible for one user to have access to several DB's (several customers, ideally for administration purposes).
So: customer1, customer2,....., oversight

The structure of DB1 is not necessarily the same as DB2. In fact it even can be a complete different 'application'.

For now there is absolutely no interaction between the two databases; but in the future I want to collect statistics (read-only) from the several databases.

Does it have more advantages to use schema's instead of separate databases with properly setup roles? Or is it better to use the different-database-setups.

share|improve this question
Is there going to be any interaction between the datasets? Will you need shared views, shared functions, or for any other reason will you need to look at data from on side to the other? If yes, then use schemas because it's much easier to communicate between schemas. If the databases are functionally separate and never communicate, you can store them in separate databases. In PG, it's possible but much more of a chore to communicate between databases. – efesar Oct 25 '13 at 16:07
Thank you for your answer! I split it up in the use of both seperate databases and schemes. For functionaly equal applications I use different schemes in one database. And for each functionally different application i use a different database. – stUrb Oct 28 '13 at 11:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.