views:

42

answers:

1

I want to create a business directory project. I want to start two businesses with this project, the first will be customized for restaurants and the second will be customized 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 design the web application to run off of one database or should each web application have it's own database? What do I need to know to help me make this decision? What are the pros and cons of each decision?

+2  A: 

Separate databases will make your queries simpler if some of the data is only relevant on a single site. From your description it looks like that toy store directory data will be different than the restaurant data. In such case you will need to identify records with some sort of site-id if you go with single database. You will then have to add "where site_id=x" in most of your queries.

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

Tahir Akhtar
alright, separate databases it is! It will be easier for me to migrate applications from one server to another. And simple queries means efficiency. Thanks!
John