drogon982007 2014-03-13 02:26
浏览 80

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

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!

  • 写回答

1条回答 默认 最新

  • doufeng5059 2014-03-14 00:06
    关注

    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!
    评论
    编辑
    预览

    报告相同问题?

    手机看
    程序员都在用的中文IT技术交流社区

    程序员都在用的中文IT技术交流社区

    专业的中文 IT 技术社区,与千万技术人共成长

    专业的中文 IT 技术社区,与千万技术人共成长

    关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

    关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

    客服 返回
    顶部