当前位置:网站首页>Database design in multi tenant mode
Database design in multi tenant mode
2022-07-05 17:20:00 【Hello ward JC】
One 、 Multi-tenant technology
- Multi-Tenancy Technology Also known as multi tenancy Technology , It's a software architecture technique , It can be implemented in multiple users ( Users here mostly refer to enterprise users ) Share the same system or program components in the environment , And it can ensure the isolation of user data .
- The core : Realize the isolation of user data under the same set of procedures .
- Multi tenancy technology is usually applied Saas Mode of software system ,Saas Mode software applications are uniformly deployed to the servers of service providers , Customers can pay according to their actual needs . stay SaaS The platform needs to use a common data center to provide the same or even customized services for most clients with a single system architecture and services , And it can still ensure the normal use of the data of each tenant . This greatly increases the difficulty of designing the system database .
- Traditional software model is different from SaaS Comparison of software modes
Two 、 Multi tenant database design
- Independent database
- Each tenant has an independent database .
- advantage : It helps to simplify the design difficulty of data model and database , High level of data isolation , Good safety , Data recovery in case of failure is relatively simple .
- shortcoming : Increased the number of database installations , Resulting in increased acquisition and maintenance costs .
- Shared database , Independent Schema
Schema
- stay oracle A database in can have multiple users , So a user usually corresponds to a Schema, Tables are built on Schema Medium . there Schema It can be understood as Oracle Users in , Create a user for each tenant .
- stay MySQL Medium Schema A special , His counterpart is MySQL Different databases under the instance database.
- Multiple or all tenants share a database service , Create one for each tenant database or schema.
- advantage : High security , Provides a degree of logical data isolation , But it's not completely isolated , Each database can support more tenants , Cost savings .
- shortcoming : Because it involves the data of other tenants , It is difficult to recover data in case of failure ; Cross tenant data statistics are difficult .
- Shared database , Shared data table
- All tenants share a database 、 A set of database tables , Add tenants to the table ID To identify which tenant the record belongs to .
- advantage : Because all tenants use a unified database, the cost is low .
- shortcoming : Lowest isolation level , Minimum safety , The system design 、 Database design is difficult , Data backup and recovery is the most difficult .
边栏推荐
- 通过proc接口调试内核代码
- 兰空图床苹果快捷指令
- Iphone14 with pill screen may trigger a rush for Chinese consumers
- 编译libssh2报错找不到openssl
- CMake教程Step1(基本起点)
- 域名解析,反向域名解析nbtstat
- 项目引入jar从私服Nexus 拉去遇到的一个问题
- 华为云云原生容器综合竞争力,中国第一!
- [Jianzhi offer] 62 The last remaining number in the circle
- The second day of learning C language for Asian people
猜你喜欢
随机推荐
[Jianzhi offer] 62 The last remaining number in the circle
First day of learning C language
叩富网开期货账户安全可靠吗?怎么分辨平台是否安全?
Read the basic grammar of C language in one article
The second day of learning C language for Asian people
Embedded-c Language-1
【Web攻防】WAF检测技术图谱
ThoughtWorks global CTO: build the architecture according to needs, and excessive engineering will only "waste people and money"
Tips for extracting JSON fields from MySQL
goto Statement
Iphone14 with pill screen may trigger a rush for Chinese consumers
飞桨EasyDL实操范例:工业零件划痕自动识别
Judge whether a number is a prime number (prime number)
Machine learning compilation lesson 2: tensor program abstraction
【剑指 Offer】66. 构建乘积数组
【性能测试】jmeter+Grafana+influxdb部署实战
Function sub file writing
CMake教程Step2(添加库)
What is ROM
Copy mode DMA






