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

查看:148
本文介绍了多个数据库与一个数据库,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.

其他一些要考虑的方面:

Some other aspects to consider:


  • 数据不会在数据库中的组织之间共享,也不会登录凭据。

  • 一些组织将允许公众注册

  • 我们计划公开一个公共API,让组织将其当前流程与我们的应用程序集成。组织将能够生成API密钥以允许访问其数据,但不会有跨组织的公共API。

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

  • Data will never be shared between organizations in the database, nor will login credentials.
  • Some organizations will allow the general public to register an account with the application to submit data, others will not.
  • We plan on exposing a public API for organizations to integrate their current processes with our application. Organizations will be able to generate API keys to allow access to their data, but there won't be a public API that spans organizations.
  • Companies will be storing potentially sensitive data in the application.

从您的经验和/或知识中,什么是正确的方式去做这个设计决定(或有一个 )

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天全站免登陆