Analysis on SaaS Data Model Design (Oracle)

Source: Internet
Author: User

Currently SAASThe platform is no stranger to everyone and truly belongs to the market.SAASThere are not many applications, but a large part of them are:ASPThe operating mode is very challenging for the company or the technical department. Last year ELearning The project is actually ASP,ASPThere will be many problems in the model itself. Although there are some differences with the traditional project model, the difference is not very big from the technical point of view.

GetSAAS Platform, so I have supplemented the relevant knowledge and recorded my practices and summary here. As there is no final verification yet, it is not clear how it works. I hope you can give me some comments.

Databases Used Oracle10gThis article is only from the perspective of data model design. The usage mode is shared.Database Independent Schema.

Oracle Implementation Method in:

1,Share a database instance for freeTenant_free Instance, billingTenant_vipInstance, platform data usageTenant_platform Instance.

2, Independent SchemaBy creating Tenant The data table used by each user is initialized based on the data imported by the user. Configure the automatic data generation method. It is normal to generate tens of thousands of database users by testing an instance.1Tens of thousands Tenant Then it will develop10For all users10 The scale of servers is acceptable to me.

3,In the past Tenant Allocate a tablespace and define the size of the data file to implement Tenant Restrictions on data space, but found through tests OracleThe number of table spaces added 200An error is reported when the maximum number of table spaces is exceeded. It seems that this method cannot be used.

All Tenant user are managed in the user management library, and then the Data Access Controller passes throughTenant user Information is automatically selected Tenant The corresponding data structure. Maybe I think this mode isMVC, That is SAAS Use MVCD(Model-View-controller-data access The data management layer is independent of the model layer and control layer for data management, and is responsible for database structure management, data access, and other functions ..


1, In OracleTo use an independent DatabaseThe memory requirement for the server is too high.200 mThen,4GThe server can only support20I think no one can afford this cost, so I will not use the first simplest method.

2, Select independent SchemaIs very important Program And performance will be greatly improved, and the business requires that all enterprise-related data table fields allow Tenant User-Defined, so I think it is necessary to select the second mode. There are many problems if you use reserved fields or extend tables to store them, such as the retrieval speed, field restrictions, and data redundancy. It is not intuitive for users.

3, From the perspective of maintenance management, data of each database user can be independently backed up during backup, which is conducive to the deletion and recovery of invalid user data. It also ensures the security of user data.

PairSAASProgram requirements:

1, Requirements can be automatically implemented through Configuration Tenant Schema The Crud Operation.

2, Data reports and related queries must be customized and related functions must be provided.

3, API The interface service must provide the configuration function.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.