Single Project Instance or Multiple Project Instances?

I want to create a business directory project. I want to start two businesses with this project, the first one will be set up for restaurants and the second one will be set up for toy stores. In terms of customization, each business project will have its own domain name, configuration settings, front-end templates and language files.

Should I create a web application to run one database or if each web application has its own database? What do I need to know to help me make this decision? What are the pros and cons of each solution?

0


a source to share


1 answer


Separate databases will simplify your queries if some of the data is specific to only one site. You can see from your description that the toy store catalog data will differ from the restaurant data. In such a case, you will need to identify the records with some kind of site ID if you go with a single database. Then you must add "where site_id = x" to most of your queries.



The only benefit I can think of in a single database is that it will be easier to update the database whenever you change your schema.

+2


a source







All Articles