用于在云上构建企业 Web (RIA) 应用程序的数据库架构(单个数据库与客户端特定的数据库) [英] Databse architecture (single db vs client specific db) for Building Enterprise Web (RIA) application on cloud

查看:25
本文介绍了用于在云上构建企业 Web (RIA) 应用程序的数据库架构(单个数据库与客户端特定的数据库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在努力重写我们现有的 RIA 并重新设计我们的数据库以重新构建它的设计.现在我们有两个关于数据库的意见:

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) 适用于所有客户的单一数据库.

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 Persistence API)的数据库,其中包括 MySQL、Postgres、Oracle、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. 每个租户的独立数据库:
    • 成本非常高,易于维护/定制,易于调整,易于备份,易于编码.
  • 与 (1) 相比成本低,可能会随着数据库大小的增加而迅速遇到问题,每个租户易于个性化,每个租户难以备份/恢复,易于编码.
  • 成本低,一个租户的负载会影响其他租户,安全和应用开发是一个挑战,每个租户难以个性化,难以恢复/备份.

我认为以上几点适用于在本地或云端托管.如果您看到租户数量增加或数据变大,则 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.

这篇关于用于在云上构建企业 Web (RIA) 应用程序的数据库架构(单个数据库与客户端特定的数据库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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