多个数据库与单个数据库 [英] Multiple databases vs single db

查看:124
本文介绍了多个数据库与单个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Web应用程序中,最好将所有数据都存储在一个数据库中,还是为每个客户创建一个数据库?

In a web application, is better have all the datas into a single db or create a database for each customer?

单个数据库将更易于维护(更新,备份等),但是如果出现任何问题,每个人都会被阻止.

Single db will be easier and faster to mantain (updates, backups etc etc), but if anything goes bad.. everyone will be blocked.

也许我可以创建单个表然后授予权限,但是我不是专家.

Maybe i can create single tables and then grant permissions, but i'm not a guru..

推荐答案

这取决于-我已经看到对数百个客户端(总共有10000个用户)使用相同数据库的应用程序运行非常平稳.我认为,取决于使用情况,要么让所有客户端使用相同的数据库(并相应地处理扩展问题),要么让客户端使用不同的服务器(易于部署,难以维护-与您最终可能会获得许多版本的软件,每个版本的略有不同.

That depends - I've seen apps that used the same database for hundreds of clients (with 10000s of users in total) run quite smoothly. In my opinion, depending on the usage scenarios, either have all clients use the same db (and deal with scaling issues accordingly), or have clients use different servers (easier to deploy, harder to maintain - as you can end up with many versions of your software, each slightly different from the other).

同一台服务器上的多个数据库是一个奇怪的混血儿,它将两种方法的缺点结合在一起.

Multiple databases on the same server is a weird half-breed which brings together the disadvantages of both approaches.

这篇关于多个数据库与单个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆