DATABSE架构(单DB VS客户特定DB)对云构建企业网站(RIA)应用 [英] Databse architecture (single db vs client specific db) for Building Enterprise Web (RIA) application on cloud

查看:205
本文介绍了DATABSE架构(单DB VS客户特定DB)对云构建企业网站(RIA)应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在努力改写现有RIA和重新设计我们的数据库,它的设计,重新设计。现在我们有2个观点有关数据库:

We are working on rewriting our existing RIA and redesigning our database to re-architect it's design. Now we have 2 opinions about database:

(这个选择是对基于SaaS的托管服务。)

(This choices are for SaaS based hosting.)

1)个人数据库为每一个客户。

1) Individual database for each customer.

2)单DB为所有客户。

2) Single DB for all customers.

我们期待的数据量好,我们的一些客户有分贝大小不等从2GB到10GB。表#是100左右。

We are expecting good amount of data, some of our customers have db size ranging from 2GB to 10GB. # of tables are around 100.

我可以了解我们应该去选择哪个答案?

Can I get an answer about which choice we shall go for?

我们不会考虑的NoSQL解决方案,截至目前,但我们计划支持约4-5数据库使用JPA(Java持久性API),包括MySQL和Postgres的,甲骨文,MSSQL现在。

We are not thinking about NoSQL solution as of now but we are planning to support about 4-5 databases with JPA (Java Persistence API) which includes MySQL, Postgres, Oracle, MSSQL for now.

P.S:我们可以利用亚马逊云托管

P.S: We might leverage Amazon cloud for hosting.

推荐答案

这通常适用于数据库的使用对于这种多租户需求的三个主要技术如下。您已经指定其中的一些。

The three main techniques that is usually applied to the database usage for this kind of a multi-tenant requirement is below. You have already specified some of them.


  1. 为每个租户独立的数据库:

    • 的成本非常高,易维护/定制,易调,轻松备份,便于code到。


    相比于(1),可能会很快遇到的问题与提高分贝的大小,便于每个租户个性化,难以备份/每个租户恢复,容易code到
  • 低成本。


  • 成本低,一个租户的负担,会影响他人,安全和应用程序开发是一个挑战,很难每个租户个性化,难以恢复/备份。

我觉得上面的点把握好托管于premise或云。
如果你看到越来越多的租户的数据的数量或挺大然后1)或2)比较好。我已经使用选项2),并看到它帮助开发和维护。

I think the above points hold good for hosting on premise or on cloud. If you see the number of tenants growing or the data getting bigger then 1) or 2) is better. I have used option 2) and have seen it helping development and maintenance.

这篇关于DATABSE架构(单DB VS客户特定DB)对云构建企业网站(RIA)应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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