Best Practice for MultiShop Application / Database?

I am planing to develop a „multi“shop system in yii and need some input about the best way to organize the data in my mysql database. What ist the „best practice“ to to the following:

The Application is managing different shop systems with the same logic but let’s say 3 different websites (with different designs and different data). For me there are three possible ways to do this:

a-> 3 different databases, yii will switch with every url request to the right database

b-> 1 database and a table prefix wich will be set

c-> 1 database and an ‚shop_id’ which also can be set by yii

what do you think? or is there another way?

Thanks!

I will prefer the third option and call it vendor_id

I made some research and decided to use the first one. is is much more simple to keep the data separated (also for backup,duplication) and you just need the logic one time to choos the database. in the other case, you have to think about the shop_id all the time (even if you can use the clever aproach of yii’s ar to handle this very smooth it will be in all your database tables). store the database parameters in the “params” array so you can switch to another database at any time.

I am planning to develop an advertisement website in YII framework…

extensions suggestions please…