假设我需要设计一个数据库,该数据库将托管多个公司的数据.现在出于安全和管理目的,我需要确保不同公司的数据被正确隔离,但我也不想启动 10 个 mysql 进程来在 10 台不同的服务器上托管 10 家公司的数据.使用 mysql 数据库执行此操作的最佳方法是什么.
Let us say I need to design a database which will host data for multiple companies. Now for security and admin purposes I need to make sure that the data for different companies is properly isolated but I also do not want to start 10 mysql processes for hosting the data for 10 companies on 10 different servers. What are the best ways to do this with the mysql database.
多租户数据库有多种方法.为了便于讨论,它们通常分为三类.
There are several approaches to multi-tenant databases. For discussion, they're usually broken into three categories.
MSDN 有一篇关于 每种设计的优缺点,以及实现示例.
MSDN has a good article on the pros and cons of each design, and examples of implementations.
<小时>微软显然已经删除了我提到的页面,但它们在 archive.org 上.链接已更改为指向那里.
作为参考,这是第二篇文章的原始链接一个>
这篇关于如何设计一个多租户的mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!