1

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.

2
  • 1
    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
    Commented Oct 25, 2013 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
    Commented Oct 28, 2013 at 11:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.