多个数据库与用于分离组织与ID的一个数据库 [英] Multiple databases vs. one database with IDs used to separate organizations

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

问题描述

在一个Web应用程序,企业可以注册和使用管理数据的情况下,什么是以下两个方案的优点和/或缺点?

In the situation of a web application that organizations can sign up for and use to manage data, what are the pros and/or cons of the two following options?


  • 每组织一个数据库,其中每个组织中的数据完全分离成单独的数据库,与保持组织及其数据库标识符的基本上市一(很小)集中式数据库

  • One database per organization where the data for each organization is entirely separated into individual databases, with one (very small) centralized database that keeps a basic listing of the organizations and their database identifiers.

整个应用程序的一个数据库,所有的实体都存储在一个大的数据库,并在每个表使用组织标识符柱分离。

One database for the entire application where all the entities are stored in one large database and separated using an organization identifier column on each table.

其他一些方面来考虑:


  • 数据永远不会被组织之间在数据库共享,也不会登录凭据。

  • 某些组织将让广大市民与应用程序提交数据注册一个帐号,另一些则不会。

  • 我们计划在揭露一个公共API,用于组织他们目前的流程与我们的应用程序集成。组织能够产生API密钥,以允许访问自己的数据,但不会有一个公共API跨越组织。

  • 公司将在应用程序中存储潜在的敏感数据。

从你的经验和/或知识,什么是正确的方式去了解这个设计决定(还是有一个正确的方式呢?)

From your experience and/or knowledge, what is the right way to go about this design decision (or is there a "right" way at all?)

推荐答案

这里是深入MSDN上(多租户数据架构)。

Here is an in-depth discussion on MSDN (Multi-Tenant Data Architecture).

我要补充一点,没有正确/错误的方法。这一切都取决于需求,现有的专业知识和成本。

I would add that there is no right/wrong way. It all depends on requirements, existing expertise and cost.

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

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