need a solution for this problem

Posted by Gayathri under ASP.NET on 8/14/2012 | Points: 10 | Views : 632 | Status : [Member] | Replies : 2
I have a online shopping site which is currently running only for chennai.
The new enahcement is supposed to be built for different cities like coimbatore, trichy ,salem,madurai and hosur.

Each city will have differnt new products as well as one may not be available as it is with other city.

should i maintain a separate database for these cities are can i enhance with the exisiting one.
My idea is i will take a back up of the exisitng database and do the necessary additions.

or should i build a component and plug in with the exisiting database.

please suggest me a good solution for this.




Responses

Posted by: GSM_GSV on: 8/14/2012 [Member] Starter | Points: 25

Up
0
Down
should i maintain a separate database for these cities are can i enhance with the existing one. 


My suggestion is, not to have different database. Just create different tables and set relation as per the requirement., Ex chn_<product>, etc... where chn--> Chennai

My idea is i will take a back up of the exisitng database and do the necessary additions.

I think this will create problem later, because products do differ w.r.t different cities.


or should i build a component and plug in with the exisiting database


I think, not necessary.


You can have a drop-down to select the city, and based on that, fetch data from the database(single database with different tables according to product and city).


---------------------------------------
Live the life you've dreamed

Regards
MADHU

Gayathri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: San.Pblr.Gct on: 8/14/2012 [Member] Starter | Points: 25

Up
0
Down
Creating database for each destination is not a good idea. When creating databases you have to allocate extra spaces which will impact performances.

Have separate tables for each destination. But for that we need to rewrite stored procs.

So my suggestion is have a new table city.
Map each destination with Code
Like
CityCode,CityName

Now for eg 1, Chennai
2,COimbatore

Now in existing table say Products.

Add a new column CItyCOde..

So map the products for citycodes.
ProductId Name CityCOde
1 Computer 1
1 Computer 2

If ProductId was primarykey for that table, now make composite primary key(productId,CityCode)

or set new productId for same product in differentcity Like this

ProductId Name CityCOde
1 Computer 1
2 Computer 2
Now you can still Maintain productId as primarykey

Gayathri, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response