PDA

View Full Version : Data driven website for multiple region



raj74
12-23-2003, 07:32 AM
hi,

I have 50 pages most of them are data driven pages from database using asp /sql 2000. This is for a particular region.

Now I have to plan for another region with the same number of pages but only the content from the database will change.

regions will be identified by different domain names.

How can i do it?

Shall i go for different database for each region and assign the connect string the moment user request a page? if this is the best method how can i assign the connect string when user requests a page.

thanks in advance
raj

compusolver
01-13-2004, 12:15 PM
Raj,

No replies yet? Sorry 'bout that! I guess most of us have been tied up since the holidays.

I would not arbitrarily go with different databases. A database is a collection of similiar, related data tables. It sounds like adding additional regions is not going to change the timbre of your data.

Having said that, there may be practical reasons for going that route (seperate databases). If the data is getting too unwieldly for instance.

So let's tackle the 'how-to' question:

First, I gotta admit that I jumped off Mr. Gates' boat about a year and a half ago, so I'm not up on my .Net and .aspx stuff.

Having said that, there is no way in .asp to programmatically select an include file. Since 'includes' are the way most of us handle connection scripts it would appear this would put a damper on seperate databases - but wait..

Your connection script itself (i.e.: the include file) could contain the logic to decide which database to connect to. But I think rather than solely relying on the I.P., I'd have a user-selectable option and remember their choice via cookie or user table.

My preference though, (sorry, Bill G.) would be to use PHP/MySQL. PHP allows conditional includes and database handling requires only a fraction of the code that ASP demands.

But we haven't looked at the issue of whether, perhaps at least some of the data could be shared between the regions. If so, then that would tip the scales definitely toward a single database.

In summary, we really don't have enough information to give you a definitive answer, but hopefully I've given you some food for thought and hopefully I'm not way too late.