Converting a desktop app using Postgre to a web based, multi store app

Hello all,

Not sure how to phrase this properly, but I have a desktop app that uses PostgrfeSQL. There are about 50 tables.

I want to convert that app to a multi-store and multi-user web app. For the database part, my thought is to use a new database for each store. Is there a better way?

Not entirely related to the question but what about multiple URLs (like one per customer, not one per store)?

Or, for cases where a single customer has multiple stores combine database use with multiple URLs?

Trying to get a handle on best way and what others do in the real world.


The thing to ask is “Will this work if I sell 100,000 copies of my app?”.

You will probably need a separate database per customer, to keep each customer’s data siloed from other customer data. But remember that you may want to have multiple customers access a single database, or one customer may want to buy/rent multiple databases. So keep the User data separate from the customer’s database.

you will sell a web shop app or do you want software as a service?

@David - It won’t be 100k copies, but will be in the thousands. Everyone is moving to a cloud solution, our customers are asking for it…

One customer, who has several stores, will definitely want to access multiple stores, even compare stores.

I’m not sure what you meant by “keep the user data separate from the customer’s database”… Are you referring to login information?

@Markus - It would be SaaS


Yes. Store the Users table inside a separate Users database and not with the customer tables.