Hello,
i am working on a Big product. The website is related to Traffic Stats and other other things.
Can i make one database to handle everything or can make one generic db and separate db for every user. Actually there are many sub tables and data regarding to users tables. There are many many functions against user tables.
I when new user is registered, then the new db will be created. If 5000 user registers, 5000 new user databases will be created.
so i have 2 options
1) make one db to handle everything
2) make one general Db for website + create seperate Db for every user
[s]plz[/s] please tell me that which is best
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Do you really want to be administering 5000 separate databases? Imagine the situation where you have a schema change - you would have to script the change across 5,000 instances, and if you get it wrong, that's 5,000 databases in a compromised state. This would require further downtime and your clients would doubtless be annoyed.
Also, unless you own/lease your own server(s), you will probably have a limit on the number of instances that you can create.
Far better to use a single database with users only allowed to view records linked to their own ID.
Also, a single database makes doing comparative metrics across clients much easier.
Imagine the situation when you will have to make some changes in your logic when 5000 new users would be already registered.
Also pay attention that you won't be able to user general tables and user tables at the same query.
I think you should use the same DB but spend a lot time to optimize it as possible.