I am currently working on a large application that will be used by many people each having a large amount of data. I thought to manage these multiple users through a single database but I am asked to create a separate database for each new user that is registered. Now what I am wondering is : is it a good idea to do so i.e. having the app create a separate database for each new user that gets registered and manage it's data through it? What will be the performance issues, if any?
Asked
Active
Viewed 219 times
0
-
Possible duplicate : http://stackoverflow.com/questions/4161292/how-to-use-multiple-database-using-php – Chandresh M Dec 26 '13 at 07:45
-
@Chandresh is it? Have you even read my question? – Kamran Ahmed Dec 26 '13 at 07:46
-
Separate db for each user might be bad idea, but you can user limit db with user id interval. For example, the users that have id 1-100 will connect to db1, 101-200 will connect to db2 – Hüseyin BABAL Dec 26 '13 at 08:04
-
I think we need more info to properly assess – Strawberry Dec 26 '13 at 09:20
2 Answers
0
My answer is create a separate database for each new user is a wonderfool idea.you must set appropiate indexes over the table and you will get good performance

Kamran Ahmed
- 11,809
- 23
- 69
- 101

Kiran RS
- 981
- 14
- 31
0
Separate DB for each new registered user might be bad idea. You can do it like this;
Put 100 users in each separate db. 1-100 => DB1, 101-200 => DB2, n, n+100 => DBn
You can keep a table for which id interval will be connect to which db. By doing this, you can lower db load. 100 users for each db is just an example. You need to use such a structure for a system that has lots of users.

Dhanish Jose
- 739
- 1
- 8
- 19

Hüseyin BABAL
- 15,400
- 4
- 51
- 73