Should multiple regional websites all use the same database?
I'm developing a 开发者_高级运维cms for a company that has multiple regional sites (us, uk, china, russia, etc..). Should I use a separate database for each of these sites or use a single database with a 'site' field in each table? My main concern is the table language encoding (ie, can storing strings in different langauges in the same table cause problems, such as sorting issues).
That depends. If you store separate data on the different sites, you should use separate databases. It is much faster and safer, though more expensive. You should also use separate databases if you want to share the same data over the sites, but you expect a heavy load. However, in this case you need a way to synchronise the data between the sites. If you store the same data and your application is not speed critical, then a centralised storage may suffice (but only experience will show if it is fast enough or not).
From what you wrote, I suspect that the first case is true (you store separate data per site), but I can't be sure.
Edit: You may also ask this on Server Fault, there are more experienced administrators there.
精彩评论