当前位置:网站首页>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 .
边栏推荐
- Judge whether a string is a full letter sentence
- Thoughtworks 全球CTO:按需求构建架构,过度工程只会“劳民伤财”
- 域名解析,反向域名解析nbtstat
- C# TCP如何设置心跳数据包,才显得优雅呢?
- 深入理解Redis内存淘汰策略
- Embedded UC (UNIX System Advanced Programming) -3
- Embedded-c language-6
- Using C language to realize palindrome number
- Embedded -arm (bare board development) -2
- 【性能测试】jmeter+Grafana+influxdb部署实战
猜你喜欢

The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"

CMake教程Step4(安装和测试)

33: Chapter 3: develop pass service: 16: use redis to cache user information; (to reduce the pressure on the database)

thinkphp3.2.3

Browser rendering principle and rearrangement and redrawing

Deeply cultivate 5g, and smart core continues to promote 5g applications

高数 | 旋转体体积计算方法汇总、二重积分计算旋转体体积

Embedded UC (UNIX System Advanced Programming) -3

High number | summary of calculation methods of volume of rotating body, double integral calculation of volume of rotating body

7.Scala类
随机推荐
High number | summary of calculation methods of volume of rotating body, double integral calculation of volume of rotating body
mysql中取出json字段的小技巧
How to write a full score project document | acquisition technology
【剑指 Offer】66. 构建乘积数组
Function sub file writing
机器学习01:绪论
【剑指 Offer】63. 股票的最大利润
Allusions of King Xuan of Qi Dynasty
[Jianzhi offer] 66 Build product array
【性能测试】jmeter+Grafana+influxdb部署实战
The first lesson of EasyX learning
Machine learning 02: model evaluation
ternary operator
一文了解MySQL事务隔离级别
菜刀,蚁剑,冰蝎,哥斯拉的流量特征
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
关于mysql中的json解析函数JSON_EXTRACT
2022 年 Q2 加密市场投融资报告:GameFi 成为投资关键词
Machine learning 01: Introduction