CN110443062A - Operating method, device and the computer equipment of multi-tenant database - Google Patents
Operating method, device and the computer equipment of multi-tenant database Download PDFInfo
- Publication number
- CN110443062A CN110443062A CN201910520741.5A CN201910520741A CN110443062A CN 110443062 A CN110443062 A CN 110443062A CN 201910520741 A CN201910520741 A CN 201910520741A CN 110443062 A CN110443062 A CN 110443062A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- pending script
- tenant
- script
- pending
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000011017 operating method Methods 0.000 title claims abstract description 25
- 238000013515 script Methods 0.000 claims abstract description 198
- 230000009471 action Effects 0.000 claims abstract description 72
- 238000000034 method Methods 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003780 insertion Methods 0.000 claims description 5
- 230000037431 insertion Effects 0.000 claims description 5
- 230000006399 behavior Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000002955 isolation Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000000686 essence Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6227—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Present applicant proposes a kind of operating method of multi-tenant database, device and computer equipments, wherein the operating method of above-mentioned multi-tenant database includes: to obtain pending script, the action type of the pending script and the information of tenant to be operated;According to the action type of the pending script, by the information configuration of tenant to be operated corresponding to pending script and the pending script with same operation type with same operation type into same configuration file;The configuration file is parsed, the pending script in the configuration file with same operation type is executed, the action type of the operation is identical as the action type of the pending script.The application may be implemented that will there is the pending script of same operation type to be configured in same configuration file, the operation for reducing multi-tenant database is time-consuming, and by the way that different types of pending script is arranged, it can satisfy the diversification operational requirements to multi-tenant database.
Description
[technical field]
This application involves big data technical field more particularly to a kind of operating methods of multi-tenant database, device and meter
Calculate machine equipment.
[background technique]
With the development of information technology, enterprise supports it to run and send out by building information platform, using application software
Exhibition.For traditional software development model, with the problems such as higher cost, the development cycle is long, and O&M is cumbersome.These problems puzzlement
Fund it is not abundant, technical strength is weaker, but be badly in need of information reform medium-sized and small enterprises.In this context, software is
Service mode (Software as a Service;Hereinafter referred to as: SaaS) mode is provided as a kind of new software service to be mentioned
Out, and become the selections of more and more enterprises.
In SaaS mode, service supplier is in order to reduce cost, it is desirable to by way of being multiplexed software and hardware, use
Resource as few as possible requires different enterprises to provide software service to be multiple.In order to reach this target, need using SaaS
One of them important technology --- multi-tenant (Multi-Tenant) technology, and multi-tenant technology has been used, it can be with SaaS mould
The application that formula provides software service is then referred to as the application of SaaS multi-tenant.
SaaS multi-tenant is applied with tradition using, it is also desirable to the support of database.SaaS multi-tenant can be supported to answer
With providing data service for multi-tenant application, be referred to as multi-tenant database with the data management software of multi-tenant feature.
The multi-tenant database of library rank isolation has the characteristics that database is huge, operational requirements diversification, but existing phase
The technical solution that is operated of multi-tenant database for the isolation of library rank provided in the technology of pass, there are operation it is time-consuming compared with
The problem of growing, being unable to satisfy diversification operational requirements.
[summary of the invention]
The embodiment of the present application provides operating method, device and the computer equipment of a kind of multi-tenant database, to realize
Pending script with same operation type is configured in same configuration file, the operation consumption of multi-tenant database is reduced
When, and by the way that different types of pending script is arranged, it can satisfy the diversification operational requirements to multi-tenant database.
In a first aspect, the embodiment of the present application provides a kind of operating method of multi-tenant database, comprising: obtain pending
The information of script, the action type of the pending script and tenant to be operated;According to the action type of the pending script,
By corresponding to pending script and the pending script with same operation type with same operation type wait grasp
Make the information configuration of tenant into same configuration file;The configuration file is parsed, is executed in the configuration file with identical
The pending script of action type is operated, the operation with database indicated by the information to the tenant to be operated
Action type it is identical as the action type of the pending script.
In one of possible implementation, the parsing configuration file, executing has in the configuration file
The pending script of same operation type includes: that the parsing configuration file is adopted according to the configuration information in the configuration file
The pending script in the configuration file with same operation type is executed with asynchronous multithreading.
In one of possible implementation, the parsing configuration file, executing has in the configuration file
After the pending script of same operation type, further includes: the implementation procedure of the monitoring pending script is collected described wait hold
The implementing result for sheet of traveling far and wide;The execution report of the pending script is generated according to the implementation procedure and/or the implementing result
It accuses.
In one of possible implementation, the action type of the pending script includes Data Definition Language;Institute
The parsing configuration file is stated, executing the pending script in the configuration file with same operation type includes: parsing institute
Configuration file is stated, the action type for the pending script for including in the configuration file is Data Definition Language;Execute it is described to
Perform script creates, modifies and/or deletes tables of data with database indicated by the information to the tenant to be operated
Operation.
In one of possible implementation, the action type of the pending script includes data manipulation language;Institute
The parsing configuration file is stated, executing the pending script in the configuration file with same operation type includes: parsing institute
Configuration file is stated, the action type for the pending script for including in the configuration file is data manipulation language;Execute it is described to
Perform script carries out insertion, inquiry and/or the deletion of data with database indicated by the information to the tenant to be operated
Operation.
In one of possible implementation, the action type of the pending script includes data control language;Institute
The parsing configuration file is stated, executing the pending script in the configuration file with same operation type includes: parsing institute
Configuration file is stated, the action type for the pending script for including in the configuration file is data control language;Execute it is described to
Perform script is controlled with the access authority of database indicated by the information to the tenant to be operated.
Second aspect, the embodiment of the present application provide a kind of operating device of multi-tenant database, comprising: obtain module, use
In the pending script of acquisition, the action type of the pending script and the information of tenant to be operated;Configuration module is used for basis
The action type of the pending script, by with same operation type pending script and it is described have same operation type
Pending script corresponding to tenant to be operated information configuration into same configuration file;Operation module, for parsing
Configuration file is stated, the pending script in the configuration file with same operation type is executed, to the tenant to be operated
Information indicated by database operated, the action type phase of the action type of the operation and the pending script
Together.
In one of possible implementation, the operation module is specifically used for parsing the configuration file, according to institute
The configuration information in configuration file is stated, is executed in the configuration file with same operation type using asynchronous multithreading wait hold
Travel far and wide this.
In one of possible implementation, described device further include: monitoring module and generation module;The monitoring mould
Block, for parsing the configuration file in the operation module, execute in the configuration file with same operation type to
After perform script, the implementation procedure of the pending script is monitored, collects the implementing result of the pending script;The life
At module, report is executed for generate the pending script according to the implementation procedure and/or the implementing result.
In one of possible implementation, the operation module, specifically for working as the operation of the pending script
When type includes Data Definition Language, the configuration file is parsed, the operation for the pending script for including in the configuration file
Type is Data Definition Language;The pending script is executed, with database indicated by the information to the tenant to be operated
Created, modified and/or deleted the operation of tables of data.
In one of possible implementation, the operation module, specifically for working as the operation of the pending script
When type includes data manipulation language, the configuration file is parsed, the operation for the pending script for including in the configuration file
Type is data manipulation language;The pending script is executed, with database indicated by the information to the tenant to be operated
Carry out the operation of insertion, inquiry and/or the deletion of data.
In one of possible implementation, the operation module, specifically for working as the operation of the pending script
When type includes data control language, the configuration file is parsed, the operation for the pending script for including in the configuration file
Type is data control language;The pending script is executed, with database indicated by the information to the tenant to be operated
Access authority controlled.
The third aspect, the embodiment of the present application provide a kind of computer equipment, including memory, processor and are stored in described
It is real when the processor executes the computer program on memory and the computer program that can run on the processor
Now method as described above.
Fourth aspect, the embodiment of the present application provide a kind of non-transitorycomputer readable storage medium, are stored thereon with meter
Calculation machine program, the computer program realize method as described above when being executed by processor.
In above technical scheme, pending script, the action type of above-mentioned pending script and tenant to be operated are obtained
After information, according to the action type of above-mentioned pending script, by pending script and above-mentioned tool with same operation type
There is the information configuration of tenant to be operated corresponding to the pending script of same operation type into same configuration file, finally,
Parse above-mentioned configuration file, execute in above-mentioned configuration file with same operation type pending script, with to above-mentioned wait grasp
Make database indicated by the information of tenant to operate, the operation class of the action type of aforesaid operations and the pending script
Type is identical, and the pending script with same operation type is configured in same configuration file so as to realize, reduces more
The operation of tenant database is time-consuming, and by the way that different types of pending script is arranged, can satisfy to multi-tenant database
Diversification operational requirements.
[Detailed description of the invention]
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for this field
For those of ordinary skill, without creative efforts, it can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the flow chart of operating method one embodiment of the application multi-tenant database;
Fig. 2 is the flow chart of another embodiment of the operating method of the application multi-tenant database;
Fig. 3 is the flow chart of the operating method further embodiment of the application multi-tenant database;
Fig. 4 is the flow chart of the operating method further embodiment of the application multi-tenant database;
Fig. 5 is the flow chart of the operating method further embodiment of the application multi-tenant database;
Fig. 6 is the flow chart of the operating method further embodiment of the application multi-tenant database;
Fig. 7 is the structural schematic diagram of operating device one embodiment of the application multi-tenant database;
Fig. 8 is the structural schematic diagram of another embodiment of the operating device of the application multi-tenant database;
Fig. 9 is the structural schematic diagram of the application computer equipment one embodiment.
[specific embodiment]
In order to better understand the technical solution of the application, the embodiment of the present application is retouched in detail with reference to the accompanying drawing
It states.
It will be appreciated that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.Base
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
Its embodiment, shall fall in the protection scope of this application.
The term used in the embodiment of the present application is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The application.In the embodiment of the present application and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning.
Fig. 1 is the flow chart of operating method one embodiment of the application multi-tenant database, as shown in Figure 1, above-mentioned more
The operating method of tenant database may include:
Step 101, the information of pending script, the action type of above-mentioned pending script and tenant to be operated is obtained.
Specifically, it after the related service that the developer of multi-tenant database disposes a lot of tenant databases, is needing
When operating to multi-tenant database, developer only needs that pending script is arranged according to operational requirements and rents wait operate
The information at family, at this moment, the available above-mentioned pending script of server, above-mentioned pending script action type and wait operate rent
The information at family.
Wherein, the information of above-mentioned tenant to be operated may include that the mark of tenant to be operated and above-mentioned tenant to be operated correspond to
Database position, the information of certain above-mentioned tenant to be operated can also include other information, and the present embodiment not limit this
It is fixed.
In the present embodiment, according to operational requirements, the information of above-mentioned tenant to be operated can be above-mentioned multi-tenant database
The information of whole tenants, or the information of the single tenant of above-mentioned multi-tenant database can also be above-mentioned multi-tenant number
The information gathered according to the specific tenant in library.
Step 102, according to the action type of above-mentioned pending script, by with same operation type pending script and
The information configuration of tenant to be operated corresponding to the above-mentioned pending script with same operation type is into same configuration file.
Specifically, the action type of above-mentioned pending script may include Data Definition Language, data manipulation language sum number
According to control language, therefore can be according to the action type of above-mentioned pending script, by the pending foot with same operation type
The information configuration of tenant to be operated corresponding to this and the pending script with same operation type into a configuration file,
In this way when executing above-mentioned pending script, a configuration file need to be only opened, so that it may execute the configuration file of above-mentioned opening
In belong at least two pending scripts of same action type, solve it is existing in the related technology, in a configuration file only
Including a pending script, when executing pending script, need to repeat open configuration file operation the problem of, subtract
The operation for having lacked multi-tenant database is time-consuming, and by the way that different types of pending script is arranged, can satisfy to multi-tenant
The diversification operational requirements of database.
Step 103, above-mentioned configuration file is parsed, the pending foot in above-mentioned configuration file with same operation type is executed
This, operated with database indicated by the information to above-mentioned tenant to be operated, the action type of aforesaid operations and it is above-mentioned to
The action type of perform script is identical.
In the operating method of above-mentioned multi-tenant database, the action type of pending script, above-mentioned pending script is obtained
After the information of tenant to be operated, according to the action type of above-mentioned pending script, by with same operation type wait hold
The information configuration originally with tenant to be operated corresponding to the above-mentioned pending script with same operation type of traveling far and wide is matched to same
It sets in file, finally, parsing above-mentioned configuration file, executes the pending foot in above-mentioned configuration file with same operation type
This, operated with database indicated by the information to above-mentioned tenant to be operated, the action type of aforesaid operations and it is described to
The action type of perform script is identical, and the pending script with same operation type is configured to same match so as to realize
It sets in file, the operation for reducing multi-tenant database is time-consuming, and by the way that different types of pending script is arranged, can satisfy
To the diversification operational requirements of multi-tenant database.
Fig. 2 is the flow chart of another embodiment of the operating method of the application multi-tenant database, as shown in Fig. 2, this Shen
Please be in embodiment illustrated in fig. 1, step 103 can be with are as follows:
Step 201, above-mentioned configuration file is parsed, according to the configuration information in above-mentioned configuration file, using asynchronous multithreading
The pending script in above-mentioned configuration file with same operation type is executed, indicated by the information to above-mentioned tenant to be operated
Database operated, the action type of aforesaid operations is identical as the action type of above-mentioned pending script.
Specifically, in the present embodiment, it can start asynchronous multithreading according to the configuration information in above-mentioned configuration file and execute
With the pending script of same operation type in above-mentioned configuration file, so as to further increase the behaviour of multi-tenant database
Make speed, the operation for reducing multi-tenant database is time-consuming.
Fig. 3 is the flow chart of the operating method further embodiment of the application multi-tenant database, as shown in figure 3, this Shen
Please after step 103, can also include: in embodiment illustrated in fig. 1
Step 301, the implementation procedure of above-mentioned pending script is monitored, the implementing result of above-mentioned pending script is collected.
Step 302, the execution report of above-mentioned pending script is generated according to above-mentioned implementation procedure and/or above-mentioned implementing result
It accuses.
Specifically, during there is the pending script of same operation type in executing above-mentioned configuration file, service
Device can monitor the implementation procedure of above-mentioned pending script, if in the process of implementation, above-mentioned pending script goes wrong, service
Device can alert in time, and terminate the implementation procedure of the pending script to go wrong in time.
In addition, being held if above-mentioned pending script does not go wrong in the process of implementation in above-mentioned pending script
After row finishes, above-mentioned pending script can be generated according to the implementation procedure and/or implementing result of above-mentioned pending script
Execute report.
Fig. 4 is the flow chart of the operating method further embodiment of the application multi-tenant database, as shown in figure 4, this Shen
Please be in embodiment illustrated in fig. 1, the action type of above-mentioned pending script can be Data Definition Language;
At this moment, step 103 may include:
Step 401, above-mentioned configuration file is parsed, the action type for the pending script for including in above-mentioned configuration file is number
According to definitional language.
Step 402, above-mentioned pending script is executed, with the progress of database indicated by the information to above-mentioned tenant to be operated
Creation, modification and/or the operation for deleting tables of data.
It, can be by executing the pending script that action type is Data Definition Language, to above-mentioned wait grasp in the present embodiment
Make the operation that database indicated by the information of tenant created, and modified and/or deleted tables of data.Specifically, discovery to
The duration that the database of operation tenant does not carry out data manipulation reaches scheduled duration, then can determine above-mentioned tenant's to be operated
Database become corpse library, at this moment, can by execute action type be Data Definition Language pending script, to not into
The database that the duration of row data manipulation reaches scheduled duration delete the operation of tables of data, so as to carry out to corpse library
Cleaning discharges the resource occupied by corpse library.Wherein, above-mentioned scheduled duration can sets itself in specific implementation, this implementation
Example is not construed as limiting the length of above-mentioned scheduled duration.
Fig. 5 is the flow chart of the operating method further embodiment of the application multi-tenant database, as shown in figure 5, this Shen
Please be in embodiment illustrated in fig. 1, the action type of above-mentioned pending script can be data manipulation language;
At this moment, step 103 may include:
Step 501, above-mentioned configuration file is parsed, the action type for the pending script for including in above-mentioned configuration file is number
According to operating language.
Step 502, above-mentioned pending script is executed, with the progress of database indicated by the information to above-mentioned tenant to be operated
The operation of insertion, inquiry and/or the deletion of data.
The flow chart of the operating method further embodiment of Fig. 6 the application multi-tenant database, as shown in fig. 6, the application
In embodiment illustrated in fig. 1, the action type of above-mentioned pending script can be data control language;
At this moment, step 103 may include:
Step 601, above-mentioned configuration file is parsed, the action type for the pending script for including in above-mentioned configuration file is number
According to control language.
Step 602, above-mentioned pending script is executed, with the visit of database indicated by the information to above-mentioned tenant to be operated
Ask that permission is controlled.
The present embodiment may be implemented to control the access authority of multi-tenant database, improve the peace of multi-tenant database
Quan Xing.
Fig. 7 is the structural schematic diagram of operating device one embodiment of the application multi-tenant database, in the present embodiment
The operating device of multi-tenant database can be used as a part of server or server, realize that the embodiment of the present application provides
Multi-tenant database operating method.As shown in fig. 7, the operating device of above-mentioned multi-tenant database may include: acquisition mould
Block 71, configuration module 72 and operation module 73;
Wherein, module 71 is obtained, is rented for obtaining the action type of pending script, above-mentioned pending script and wait operate
The information at family;Specifically, it after the related service that the developer of multi-tenant database disposes a lot of tenant databases, is needing
When operating to multi-tenant database, developer only needs that pending script is arranged according to operational requirements and rents wait operate
At this moment the information at family obtains the available above-mentioned pending script of module 71, the action type of above-mentioned pending script and wait grasp
Make the information of tenant.
Wherein, the information of above-mentioned tenant to be operated may include that the mark of tenant to be operated and above-mentioned tenant to be operated correspond to
Database position, the information of certain above-mentioned tenant to be operated can also include other information, and the present embodiment not limit this
It is fixed.
In the present embodiment, according to operational requirements, the information of above-mentioned tenant to be operated can be above-mentioned multi-tenant database
The information of whole tenants, or the information of the single tenant of above-mentioned multi-tenant database can also be above-mentioned multi-tenant number
The information gathered according to the specific tenant in library.
Configuration module 72, for the action type according to above-mentioned pending script, by with same operation type wait hold
The information configuration originally with tenant to be operated corresponding to the above-mentioned pending script with same operation type of traveling far and wide is matched to same
It sets in file;Specifically, the action type of above-mentioned pending script may include Data Definition Language, data manipulation language sum number
According to control language, therefore configuration module 72 can will have same operation type according to the action type of above-mentioned pending script
Pending script and pending script with same operation type corresponding to tenant to be operated information configuration to one
In configuration file, in this way when executing above-mentioned pending script, a configuration file need to be only opened, so that it may execute above-mentioned opening
Configuration file in belong at least two pending scripts of same action type, solve it is existing in the related technology, one is matched
Setting in file only includes a pending script, when executing pending script, needs to repeat the behaviour for opening configuration file
The problem of making, the operation for reducing multi-tenant database is time-consuming, and by the way that different types of pending script, Ke Yiman is arranged
Diversification operational requirements of the foot to multi-tenant database.
Operation module 73, for parsing above-mentioned configuration file, executing has same operation type in above-mentioned configuration file
Pending script is operated, the action type of aforesaid operations with database indicated by the information to above-mentioned tenant to be operated
It is identical as the action type of pending script.
In the operating device of above-mentioned multi-tenant database, obtains module 71 and obtain pending script, above-mentioned pending script
Action type and tenant to be operated information after, configuration module 72 will have according to the action type of above-mentioned pending script
Have and is rented corresponding to the pending script and the above-mentioned pending script with same operation type of same operation type wait operate
The information configuration at family is into same configuration file, finally, operation module 73 parses above-mentioned configuration file, executes above-mentioned configuration file
In with same operation type pending script, grasped with database indicated by the information to above-mentioned tenant to be operated
Make, the action type of aforesaid operations is identical as the action type of the pending script, there will be identical behaviour so as to realize
The pending script for making type is configured in same configuration file, and the operation for reducing multi-tenant database is time-consuming, and by setting
Different types of pending script is set, can satisfy the diversification operational requirements to multi-tenant database.
Fig. 8 is the structural schematic diagram of another embodiment of the operating device of the application multi-tenant database, in the present embodiment,
Operation module 73 is specifically used for parsing above-mentioned configuration file, according to the configuration information in above-mentioned configuration file, using asynchronous multi-thread
With the pending script of same operation type in the above-mentioned configuration file of Cheng Zhihang.
Specifically, in the present embodiment, operation module 73 can start asynchronous according to the configuration information in above-mentioned configuration file
Multithreading executes the pending script in above-mentioned configuration file with same operation type, so as to further increase multi-tenant
The service speed of database, the operation for reducing multi-tenant database are time-consuming.
Further, the operating device of above-mentioned multi-tenant database can also include: monitoring module 74 and generation module 75;
Monitoring module 74, for parsing above-mentioned configuration file in operation module 73, executing has phase in above-mentioned configuration file
After the pending script of biconditional operation type, the implementation procedure of above-mentioned pending script is monitored, collects above-mentioned pending script
Implementing result;
Generation module 75, for generating the execution of pending script according to above-mentioned implementation procedure and/or above-mentioned implementing result
Report.
Specifically, during there is the pending script of same operation type in executing above-mentioned configuration file, monitoring
Module 74 can monitor the implementation procedure of above-mentioned pending script, if in the process of implementation, above-mentioned pending script goes wrong,
Server can alert in time, and terminate the implementation procedure of the pending script to go wrong in time.
In addition, being held if above-mentioned pending script does not go wrong in the process of implementation in above-mentioned pending script
Row finish after, generation module 75 can according to the implementation procedure and/or implementing result of above-mentioned pending script generate it is above-mentioned to
Perform script executes report.
In a kind of implementation of the present embodiment, operation module 73, specifically for working as the operation class of above-mentioned pending script
When type includes Data Definition Language, above-mentioned configuration file is parsed, the operation class for the pending script for including in above-mentioned configuration file
Type is Data Definition Language;Execute above-mentioned pending script, with database indicated by the information to above-mentioned tenant to be operated into
Row creation, modification and/or the operation for deleting tables of data.
In the present embodiment, operation module 73 can be the pending script of Data Definition Language by execution action type,
Database indicated by information to above-mentioned tenant to be operated creates, modifies and/or deletes the operation of tables of data.Specifically
Ground reaches scheduled duration in the duration that the database for finding tenant to be operated does not carry out data manipulation, then can determine above-mentioned
The database of tenant to be operated becomes corpse library, can be the pending of Data Definition Language by executing action type at this moment
Script delete to the database that no duration for carrying out data manipulation reaches scheduled duration the operation of tables of data, so as to
To clear up corpse library, the resource occupied by corpse library is discharged.Wherein, above-mentioned scheduled duration can in specific implementation certainly
Row setting, the present embodiment are not construed as limiting the length of above-mentioned scheduled duration.
In another implementation of the present embodiment, operation module 73, specifically for working as the operation of above-mentioned pending script
When type includes data manipulation language, above-mentioned configuration file is parsed, the operation for the pending script for including in above-mentioned configuration file
Type is data manipulation language;Above-mentioned pending script is executed, with database indicated by the information to above-mentioned tenant to be operated
Carry out the operation of insertion, inquiry and/or the deletion of data.
In another implementation of the present embodiment, operation module 73, specifically for working as the operation of above-mentioned pending script
When type includes data control language, above-mentioned configuration file is parsed, the operation for the pending script for including in above-mentioned configuration file
Type is data control language;Above-mentioned pending script is executed, with database indicated by the information to above-mentioned tenant to be operated
Access authority controlled.
The present embodiment may be implemented to control the access authority of multi-tenant database, improve the peace of multi-tenant database
Quan Xing.
Fig. 9 is the structural schematic diagram of the application computer equipment one embodiment, and above-mentioned computer equipment may include depositing
Reservoir, processor and it is stored in the computer program that can be run on above-mentioned memory and on above-mentioned processor, above-mentioned processor
When executing above-mentioned computer program, the operating method of multi-tenant database provided by the embodiments of the present application may be implemented.
Wherein, above-mentioned computer equipment can be server, such as: cloud server;The present embodiment is to above-mentioned computer
The specific form of equipment is not construed as limiting.
Fig. 9 shows the block diagram for being suitable for the exemplary computer device for being used to realize the application embodiment.What Fig. 9 was shown
Computer equipment is only an example, should not function to the embodiment of the present application and use scope bring any restrictions.
As shown in figure 9, above-mentioned computer equipment is showed in the form of universal computing device.The component of computer equipment can be with
Including but not limited to: one or more processor 410, memory 430 connect different system components (including 430 He of memory
Processing unit 410) communication bus 440.
Communication bus 440 indicates one of a few class bus structures or a variety of, including memory bus or memory control
Device processed, peripheral bus, graphics acceleration port, processor or total using the local of any bus structures in a variety of bus structures
Line.For example, these architectures include but is not limited to industry standard architecture (Industry Standard
Architecture;Hereinafter referred to as: ISA) bus, microchannel architecture (Micro Channel Architecture;Below
Referred to as: MAC) bus, enhanced isa bus, Video Electronics Standards Association (Video Electronics Standards
Association;Hereinafter referred to as: VESA) local bus and peripheral component interconnection (Peripheral Component
Interconnection;Hereinafter referred to as: PCI) bus.
Computer equipment typically comprises a variety of computer system readable media.These media can be and any can be counted
Calculate the usable medium of machine equipment access, including volatile and non-volatile media, moveable and immovable medium.
Memory 430 may include the computer system readable media of form of volatile memory, such as arbitrary access is deposited
Reservoir (Random Access Memory;Hereinafter referred to as: RAM) and/or cache memory.Computer equipment can be into one
Step includes other removable/nonremovable, volatile/non-volatile computer system storage mediums.Although not showing in Fig. 9
Out, the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, and to removable
Anonvolatile optical disk (such as: compact disc read-only memory (Compact Disc Read Only Memory;Hereinafter referred to as: CD-
ROM), digital multi CD-ROM (Digital Video Disc Read Only Memory;Hereinafter referred to as: DVD-ROM)
Or other optical mediums) read-write CD drive.In these cases, each driver can be counted by one or more
It is connected according to Media Interface Connector with communication bus 440.Memory 430 may include at least one program product, which has
One group of (for example, at least one) program module, these program modules are configured to perform the function of each embodiment of the application.
Program/utility with one group of (at least one) program module, can store in memory 430, in this way
Program module include --- but being not limited to --- operating system, one or more application program, other program modules and
It may include the realization of network environment in program data, each of these examples or certain combination.Program module is usually held
Function and/or method in row embodiments described herein.
Computer equipment can also be communicated with one or more external equipments (such as keyboard, sensing equipment, display etc.),
Can also be enabled a user to one or more equipment interacted with the computer equipment communication, and/or with make the computer
Any equipment (such as network interface card, modem etc.) that equipment can be communicated with one or more of the other calculating equipment is logical
Letter.This communication can be carried out by communication interface 420.Also, computer equipment can also be by network adapter (in Fig. 9
Be not shown) with one or more network (such as local area network (Local Area Network;Hereinafter referred to as: LAN), wide area network
(Wide Area Network;Hereinafter referred to as: WAN) and/or public network, for example, internet) communication, above-mentioned network adapter
It can be communicated by communication bus 440 with other modules of computer equipment.It should be understood that although being not shown in Fig. 9, Ke Yijie
It closes computer equipment and uses other hardware and/or software module, including but not limited to: microcode, device driver, redundancy processing
Unit, external disk drive array, disk array (Redundant Arrays of Independent Drives;Following letter
Claim: RAID) system, tape drive and data backup storage system etc..
The program that processor 410 is stored in memory 430 by operation, thereby executing various function application and data
Processing, such as realize the operating method of multi-tenant database provided by the embodiments of the present application.
The embodiment of the present application also provides a kind of non-transitorycomputer readable storage medium, is stored thereon with computer journey
The operation side of multi-tenant database provided by the embodiments of the present application may be implemented in sequence, above-mentioned computer program when being executed by processor
Method.
Above-mentioned non-transitorycomputer readable storage medium can appointing using one or more computer-readable media
Meaning combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.Computer can
Reading storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device
Or device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes:
Electrical connection, portable computer diskette, hard disk, random access memory (RAM), read-only storage with one or more conducting wires
Device (Read Only Memory;Hereinafter referred to as: ROM), erasable programmable read only memory (Erasable
Programmable Read Only Memory;Hereinafter referred to as: EPROM) or flash memory, optical fiber, portable compact disc are read-only deposits
Reservoir (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer
Readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded execution system, device
Either device use or in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium other than computer readable storage medium, which can send, propagate or
Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the application operation computer
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.In
It is related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (Local
Area Network;Hereinafter referred to as: LAN) or wide area network (Wide Area Network;Hereinafter referred to as: WAN) it is connected to user
Computer, or, it may be connected to outer computer (such as being connected using ISP by internet).
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discussed suitable
Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be by the application
Embodiment person of ordinary skill in the field understood.
Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination " or " in response to detection ".Similarly, depend on context, phrase " if it is determined that " or " if detection
(condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when the detection (condition of statement
Or event) when " or " in response to detection (condition or event of statement) ".
It should be noted that terminal involved in the embodiment of the present application can include but is not limited to personal computer
(Personal Computer;Hereinafter referred to as: PC), personal digital assistant (Personal Digital Assistant;Below
Referred to as: PDA), radio hand-held equipment, tablet computer (Tablet Computer), mobile phone, MP3 player, MP4 player etc..
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that device (can be personal computer, server or network equipment etc.) or processor (Processor) execute the application
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory;Hereinafter referred to as: ROM), random access memory (Random Access Memory;Hereinafter referred to as: RAM),
The various media that can store program code such as magnetic or disk.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.
Claims (10)
1. a kind of operating method of multi-tenant database characterized by comprising
Obtain the information of pending script, the action type of the pending script and tenant to be operated;
According to the action type of the pending script, by with same operation type pending script and it is described have it is identical
The information configuration of tenant to be operated corresponding to the pending script of action type is into same configuration file;
The configuration file is parsed, the pending script in the configuration file with same operation type is executed, to described
Database indicated by the information of tenant to be operated operates, the behaviour of the action type of the operation and the pending script
It is identical to make type.
2. the method according to claim 1, wherein the parsing configuration file, executes the configuration text
Include: with the pending script of same operation type in part
The configuration file is parsed, according to the configuration information in the configuration file, the configuration is executed using asynchronous multithreading
With the pending script of same operation type in file.
3. the method according to claim 1, wherein the parsing configuration file, executes the configuration text
After pending script in part with same operation type, further includes:
The implementation procedure of the pending script is monitored, the implementing result of the pending script is collected;
Report is executed according to what the implementation procedure and/or the implementing result generated the pending script.
4. method according to claim 1 to 3, which is characterized in that the action type packet of the pending script
Include Data Definition Language;
The parsing configuration file, executing the pending script in the configuration file with same operation type includes:
The configuration file is parsed, the action type for the pending script for including in the configuration file is Data Definition Language;
Execute the pending script, created with database indicated by the information to the tenant to be operated, modify and/
Or delete the operation of tables of data.
5. method according to claim 1 to 3, which is characterized in that the action type packet of the pending script
Include data manipulation language;
The parsing configuration file, executing the pending script in the configuration file with same operation type includes:
The configuration file is parsed, the action type for the pending script for including in the configuration file is data manipulation language;
Execute the pending script, with database indicated by the information to the tenant to be operated carry out data insertion,
Inquiry and/or the operation deleted.
6. method according to claim 1 to 3, which is characterized in that the action type packet of the pending script
Include data control language;
The parsing configuration file, executing the pending script in the configuration file with same operation type includes:
The configuration file is parsed, the action type for the pending script for including in the configuration file is data control language;
The pending script is executed, is controlled with the access authority of database indicated by the information to the tenant to be operated
System.
7. a kind of operating device of multi-tenant database characterized by comprising
Module is obtained, for obtaining the information of pending script, the action type of the pending script and tenant to be operated;
Configuration module, for the action type according to the pending script, by the pending script with same operation type
With the information configuration of tenant to be operated corresponding to the pending script with same operation type to same configuration file
In;
Operation module is executed pending with same operation type in the configuration file for parsing the configuration file
Script is operated with database indicated by the information to the tenant to be operated, the action type of the operation with it is described
The action type of pending script is identical.
8. device according to claim 7, which is characterized in that
The operation module is specifically used for parsing the configuration file, and according to the configuration information in the configuration file, use is different
Step multithreading executes the pending script in the configuration file with same operation type.
9. a kind of computer equipment, which is characterized in that including memory, processor and be stored on the memory and can be in institute
The computer program run on processor is stated, when the processor executes the computer program, is realized as in claim 1-6
Any method.
10. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the meter
Such as method as claimed in any one of claims 1 to 6 is realized when calculation machine program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910520741.5A CN110443062B (en) | 2019-06-17 | Operation method and device of multi-tenant database and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910520741.5A CN110443062B (en) | 2019-06-17 | Operation method and device of multi-tenant database and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110443062A true CN110443062A (en) | 2019-11-12 |
CN110443062B CN110443062B (en) | 2024-07-09 |
Family
ID=
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113553197A (en) * | 2021-07-21 | 2021-10-26 | 用友汽车信息科技(上海)股份有限公司 | Data processing method, device and readable storage medium |
CN114153858A (en) * | 2021-11-26 | 2022-03-08 | 泰康保险集团股份有限公司 | Method and device for automatically updating tenant in MySQL table space |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101120337A (en) * | 2004-04-02 | 2008-02-06 | 易享信息技术(上海)有限公司 | Custom entities and fields in a multi-tenant database system |
WO2012073233A1 (en) * | 2010-11-29 | 2012-06-07 | Biocatch Ltd. | Method and device for confirming computer end-user identity |
CN103577457A (en) * | 2012-07-31 | 2014-02-12 | 国际商业机器公司 | Method and system for controlling multi-tenant database |
CN104487959A (en) * | 2012-04-25 | 2015-04-01 | 思杰系统有限公司 | Secure administration of virtual machines |
CN106484485A (en) * | 2016-10-21 | 2017-03-08 | 贵阳朗玛信息技术股份有限公司 | The script execution of multiserver and device |
US20170091231A1 (en) * | 2015-09-30 | 2017-03-30 | Oracle International Corporation | Multi-tenant customizable composites |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN107656722A (en) * | 2017-07-31 | 2018-02-02 | 平安科技(深圳)有限公司 | Data manipulation method, device and computer-readable recording medium |
CN107710157A (en) * | 2015-06-23 | 2018-02-16 | 微软技术许可有限责任公司 | Multi-tenant, the specific application program of tenant |
CN108475360A (en) * | 2015-12-31 | 2018-08-31 | 微软技术许可有限责任公司 | Distributed Calculation relies on management system |
CN108881111A (en) * | 2017-05-10 | 2018-11-23 | 中兴通讯股份有限公司 | A kind of method and device for realizing multi-tenant system |
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101120337A (en) * | 2004-04-02 | 2008-02-06 | 易享信息技术(上海)有限公司 | Custom entities and fields in a multi-tenant database system |
WO2012073233A1 (en) * | 2010-11-29 | 2012-06-07 | Biocatch Ltd. | Method and device for confirming computer end-user identity |
CN104487959A (en) * | 2012-04-25 | 2015-04-01 | 思杰系统有限公司 | Secure administration of virtual machines |
CN103577457A (en) * | 2012-07-31 | 2014-02-12 | 国际商业机器公司 | Method and system for controlling multi-tenant database |
CN107710157A (en) * | 2015-06-23 | 2018-02-16 | 微软技术许可有限责任公司 | Multi-tenant, the specific application program of tenant |
US20170091231A1 (en) * | 2015-09-30 | 2017-03-30 | Oracle International Corporation | Multi-tenant customizable composites |
CN108475360A (en) * | 2015-12-31 | 2018-08-31 | 微软技术许可有限责任公司 | Distributed Calculation relies on management system |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN106484485A (en) * | 2016-10-21 | 2017-03-08 | 贵阳朗玛信息技术股份有限公司 | The script execution of multiserver and device |
CN108881111A (en) * | 2017-05-10 | 2018-11-23 | 中兴通讯股份有限公司 | A kind of method and device for realizing multi-tenant system |
CN107656722A (en) * | 2017-07-31 | 2018-02-02 | 平安科技(深圳)有限公司 | Data manipulation method, device and computer-readable recording medium |
Non-Patent Citations (1)
Title |
---|
张祥俊;伍卫国;: "基于FastDFS的数字媒体系统设计与实现技术研究", 计算机技术与发展, no. 05, 21 December 2018 (2018-12-21) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113553197A (en) * | 2021-07-21 | 2021-10-26 | 用友汽车信息科技(上海)股份有限公司 | Data processing method, device and readable storage medium |
CN113553197B (en) * | 2021-07-21 | 2022-06-03 | 用友汽车信息科技(上海)股份有限公司 | Data processing method, device and readable storage medium |
CN114153858A (en) * | 2021-11-26 | 2022-03-08 | 泰康保险集团股份有限公司 | Method and device for automatically updating tenant in MySQL table space |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109144695A (en) | A kind of processing method, device, equipment and the medium of task topological relation | |
US8495313B2 (en) | Transferring learning metadata between storage servers having clusters via copy services operations on a shared virtual logical unit that stores the learning metadata | |
US8966175B2 (en) | Automated storage provisioning within a clustered computing environment | |
CN109697066A (en) | Realize the method and system of tables of data splicing and automatic training machine learning model | |
US8402118B2 (en) | Intelligent LUN generation and management | |
CN102902763B (en) | The method of association, retrieving information process data and process information task and device | |
CN104135520B (en) | A kind of method and device for identifying android terminal | |
CN108427728A (en) | Management method, equipment and the computer-readable medium of metadata | |
CN108595316A (en) | Life cycle management method, manager, equipment and the medium of Distributed Application | |
CN109271358A (en) | Data summarization method, querying method, device, equipment and storage medium | |
WO2018083558A1 (en) | Storing and retrieving restricted datasets to and from a cloud network with non-restricted datasets | |
CN109683880A (en) | Webpage exchange method, device, equipment and storage medium | |
CN109284427A (en) | A kind of document structure tree method, apparatus, server and storage medium | |
CN109086176A (en) | A kind of SSD steady-state method of test, device, equipment and storage medium based on FIO | |
CN109561212A (en) | A kind of merging method of release information, device, equipment and storage medium | |
US20150220524A1 (en) | Verifying file versions in a networked computing environment | |
CN107368568A (en) | A kind of method, apparatus, equipment and storage medium for taking down notes generation | |
CN102681790B (en) | A kind of data dump equipment and carried out the method and system of data dump by it | |
CN109284108A (en) | Date storage method, device, electronic equipment and storage medium | |
US10810160B2 (en) | Automated hardware device storage tiering | |
CN114461691A (en) | Control method and device of state machine, electronic equipment and storage medium | |
US9342527B2 (en) | Sharing electronic file metadata in a networked computing environment | |
CN109739856A (en) | Method and system for the relationship established between tables of data | |
CN109347899A (en) | The method of daily record data is written in distributed memory system | |
CN108845892A (en) | Data processing method, device, equipment and the computer storage medium of distributed data base |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |