views:

282

answers:

5

I'm going to write a multi site content management system in ASP.NET. What will be faster: a database for every site, or one database for all sites?

Thanks.

EDIT: If a database for every site, which database should I use? XML?

+2  A: 

Hi,

A single database for all sites may end up being a bad choise in case you have websites with a large number of visits. Also, that means your database tables will have to be more complex, making the system go slower.

About the format of the databases, XML ain't one of them for sure. Try use MySQL or Postgree for instance.

yoda
Should it be a server database or a file-database (like Access)?
Server database. File-database are more used in windows servers, so if you use windows as your web server, it may also be a viable option (altought I'm not really aware of the performances, I'd bet server database is faster)
yoda
+2  A: 

That really depends on how complicate your CMS will be, if it is a simple micro CMS just like a blog, and you don't have many subscribers for this service, and those subscribers probably have same functions and features on their CMS, then one database could be a choice.

But if your CMS has many granular configuration levels, many functions and features, potentially have large dataset to store. I will recommend separated database for each instance.

File-database, especially Access this kind of database is not designed for online applications, they may have simultaneous connection restrains, so when there are many requests received, it may refuse to serve your web application.

if you are using microsoft technologies, there is no much choice you have for the database, MSSQL probably is the only choice, you may choose SQL Express, but it is not ideal for large sites.

Actually, there are many open source CMS available, even you want to choose microsoft technology based cms, you may try those first to get some feeling on your design.

good luck.

machinegone
A: 

One option is to go with a multi-tenancy single instance application and database.

For small sites who sign-up and go (SaaS) this will enable less maintenance for the revenue made. For larger clients who will pay for more for support and maintenance, you can always give them their own single instance.

An option could be hosting the database in the microsoft Cloud "SQl Azure" http://www.microsoft.com/azure/sql.mspx

Mark Redman
A: 

Why do you need it to be on multiple instances? Do they work with the same data? IF so, you could setup each instance with its own database (msSQL, mySQL, etc.) and use web services to exchange data between them. This would be the most 'loose-coupled' solution :)

Cristi Cotovan
+1  A: 

Since you're building with .NET, you may want to take a serious look at SaaSGrid (FYI - I work at Apprenda). You simply write the application as if it were for a single customer, but upon deployment, SaaSGrid transforms the application to be a true-multitenant SaaS offering. So you data-model question actually becomes a deploy time configuration option, rather than a major design time decision. There a tons of other benefits as well, but for the sake of not sounding like a commercial, I'll leave it at that :-).

Also, here's a good technical article about multi-tenancy:

http://msdn.microsoft.com/en-us/library/aa479086.aspx

Hope this helps.

  • Jesse
Kliza23