每个用户应该有一个单独的孤立的数据库?

I don't know if this question belongs here or not, someone please move it to an appropriate place if needed.

We are working on a web application using PHP and MySQL. The software is of the sort that provides a lot of pre-fed data to its users. For example, a list of questions and answers like a knowledge base. Now every user who registers into the system would have the liberty to add/update/delete this knowledge base, without affecting the data of the other users.

Now I understand that we would require to have a master copy of this pre-fed data, and would have to make a copy of this data available to users.

I was wondering how to implement this in the system without affecting the performance. Would we have to create separate databases for each user?

Any pointers?

Thanks!

I find three approaches to this, they'd depend upon your domain requirement.

  1. You're 'seeding' configurations and basic data for which it does make sense (to me) to localize the settings per user. I guess most of the apps follow this.
  2. If it's domain data, when you say knowledge base (which I take to be very huge), it'd make more sense to save the per user edits and merge the master data with a user's personalized data. This is a very abstract & I wouldn't know it's implementation unless I actually see the data modeling, but then this looks a viable approach!
  3. Save edits from all the users separately at one location (per collection or however you wish) if you want collaboration and stuff. With this, I think, it'd be easier to grow your knowledge base, although you can do the same with the previous approach with a little help from DBA!