Mysql – New Database vs New Table for User Registrations

ArchitectureconfigurationMySQL

Here's an example, there is this application that completes a task (mostly data-enrty stuff). Users can sign-up on a website to begin using the application straight away.

At the moment, I was looking at setting up a new database for each user that signs up and loading the tables that are required in etc at this first signup.

However, in my previous questions about permissions, someone bought up the issues of scalability when using new databases for each user, it certainly isn't an impossible task but updating (for example, 500 users) all of those databases is going to be a huge task.

What is the best way to create these databases or tables for these new signups?

  • Each user can probably have 7 or 8 tables minimum from the outset.
  • There could be about 12 tables pretty soon too

The only other way I can see of how to do it is to have those 12 tables (or whatever) and just have many rows with respective user id's associated with them. However, should I do this, would there be an issue, if 30 or 40 people were logged on and updating/modifying information, with speed etc? vs. having new databases for each?

Best Answer

Having a separate database for every user is an extremely bad idea. It will be a nightmare to keep up.

Your database sounds teeny tiny, I would not worry about it causing problems to have one database. Databases can easily be designed to perform well with one database and can handle terrabytes of information speedily if properly designed.