CN106599268A - Processing method and device of SQL statement - Google Patents
Processing method and device of SQL statement Download PDFInfo
- Publication number
- CN106599268A CN106599268A CN201611200611.6A CN201611200611A CN106599268A CN 106599268 A CN106599268 A CN 106599268A CN 201611200611 A CN201611200611 A CN 201611200611A CN 106599268 A CN106599268 A CN 106599268A
- Authority
- CN
- China
- Prior art keywords
- trigger
- modification information
- information
- resource
- triggering
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Abstract
The invention provides a processing method and device of a SQL statement. The processing method comprises the following steps: acquiring change information of each of a resource table, a resource relation table and a parameter table; triggering a trigger according to the change information, and synchronizing the change information to a server information table according to the trigger. By use of the processing method provided by the invention, the change information of the resource table, the resource relation table and the parameter table can be acquired, and then the trigger is triggered according to the change information, and the change information is synchronized to the server information table according to the trigger; the server information table can be synchronized and updated at any time according to the change of each of the resource table, the self-associated relation table and the parameter table by sufficient use of the object cooperative work of a database, thereby facilitating the query, and then the query performance is improved.
Description
Technical field
The present invention relates to database technical field, it particularly relates to a kind for the treatment of method and apparatus of SQL statement.
Background technology
In monitoring system server, need to resource that (resource includes:Server, blade chassis, rack, machine room, city
Deng) be monitored, but only server resource is monitored here, and by database storage resources information, in database
In be stored with resource table, resources relationship table, parameter list, wherein, resource table, storage be some server resources basic number
According to such as:Resource name, resource description etc.;Resources relationship table, storage be resource table auto correlation relation, the such as resource of server 1
Positioned at the resource of blade chassis 1, the resource of blade chassis 1 is located at the resource of rack 1, and the resource of rack 1 is located at the resource of machine room 1, the resource of machine room 1
Positioned at the of this sort auto correlation relation such as the resource of city 1;Parameter list, storage be resource some parameter informations, such as service
Device IP, girff height etc., and it is the parameter list of resource table.
Based on three tables above, if to obtain server resource essential information, parameter information and its incidence relation, need to spell
SQL (Structured Query Language, SQL) is write, but the spelling of SQL can be more complicated, does not allow
Easily modification, while query performance also cannot be guaranteed.
For the problem in correlation technique, effective solution is not yet proposed at present.
The content of the invention
For the problem in correlation technique, the present invention proposes a kind for the treatment of method and apparatus of SQL statement, can be by filling
Point using database object collaborative work, it is ensured that server info table can at any time according to resource table, auto correlation relation table,
The change of parameter list carrys out synchronized update, so as to facilitate inquiry, and then improves query performance.
The technical scheme is that what is be achieved in that:
According to an aspect of the invention, there is provided a kind of processing method of SQL statement.
The processing method includes:
Obtain resource table, resources relationship table, the modification information of parameter list;
According to modification information, trigger is triggered, and according to trigger, modification information is synchronized to into server info table.
According to one embodiment of present invention, modification information includes:Addition information, deletion information, incidence relation change letter
Breath.
According to one embodiment of present invention, according to modification information, triggering trigger includes:
According to modification information, trigger is judged whether;
In the presence of trigger, trigger is triggered;
In the case of trigger is non-existent, trigger is created, and trigger the trigger after creating.
According to one embodiment of present invention, according to trigger, modification information is synchronized to into server info table includes:
According to trigger, storing process is called, and according to storing process, modification information is synchronized to into server info table.
According to a further aspect in the invention, there is provided a kind of processing meanss of SQL statement.
The processing meanss include:
Acquisition module, for obtaining the modification information of resource table, resources relationship table, parameter list;
Triggering synchronization module, for according to modification information, triggering trigger, and according to trigger, by modification information synchronization
To server info table.
According to one embodiment of present invention, modification information includes:Addition information, deletion information, incidence relation change letter
Breath.
According to one embodiment of present invention, triggering synchronization module includes:
Judge module, for according to modification information, judging whether trigger;
Trigger module, in the presence of trigger, triggering trigger;
Trigger module is created, in the case of trigger is non-existent, creating trigger, and the triggering after creating is triggered
Device.
According to one embodiment of present invention, triggering synchronization module includes:
Synchronization module is called, it is for according to trigger, calling storing process, and according to storing process, modification information is same
Walk to server info table.
The present invention, subsequently according to modification information, is touched by obtaining resource table, resources relationship table, the modification information of parameter list
Trigger is sent out, and according to trigger, modification information is synchronized to into server info table, assisted by making full use of the object of database
With work, it is ensured that server info table can at any time according to resource table, auto correlation relation table, parameter list change come synchronization more
Newly, so as to facilitate inquiry, and then improve query performance.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment
The accompanying drawing that needs are used is briefly described, it should be apparent that, drawings in the following description are only some enforcements of the present invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can be being obtained according to these accompanying drawings
Obtain other accompanying drawings.
Fig. 1 is the flow chart of the processing method of SQL statement according to embodiments of the present invention;
Fig. 2 is the particular flow sheet of the processing method of SQL statement according to embodiments of the present invention;
Fig. 3 is the block diagram of the processing meanss of SQL statement according to embodiments of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained belongs to present invention protection
Scope.
A kind of embodiments in accordance with the present invention, there is provided processing method of SQL statement.
As shown in figure 1, processing method according to embodiments of the present invention includes:
Step S101, obtains resource table, resources relationship table, the modification information of parameter list;
Step S103, according to modification information, triggers trigger, and according to trigger, modification information is synchronized to into server
Information table.
By the present invention such scheme, by obtain resource table, resources relationship table, parameter list modification information, subsequently
According to modification information, trigger is triggered, and according to trigger, modification information is synchronized to into server info table, by fully profit
With the object collaborative work of database, it is ensured that server info table can at any time according to resource table, auto correlation relation table, parameter
The change of table carrys out synchronized update, so as to facilitate inquiry, and then improves query performance.
According to one embodiment of present invention, modification information includes:Addition information, deletion information, incidence relation change letter
Breath.
According to one embodiment of present invention, according to modification information, triggering trigger includes:
According to modification information, trigger is judged whether;
In the presence of trigger, trigger is triggered;
In the case of trigger is non-existent, trigger is created, and trigger the trigger after creating.
According to one embodiment of present invention, according to trigger, modification information is synchronized to into server info table includes:
According to trigger, storing process is called, and according to storing process, modification information is synchronized to into server info table.
In order to preferably describe the present invention, it is described in detail below by a specific embodiment.
As shown in Fig. 2 first, a newly-built server info table, it is used for unifying service device essential information, parameter
Information and its affiliated girff, rack etc., and a newly-built storing process is for from resource table, parameter list, resources relationship table
Middle extraction data, and the data extracted are updated in server info table, and newly-built trigger, each resource table, parameter
When table, resources relationship table occur insert (addition), delete (deletion), update (renewal) operations, storing process is called, and
Data are correctly synchronized in server info table;
Secondly, when resource table, parameter list, resources relationship table occur addition, delete, update, trigger, trigger are triggered
Can call storing process, storing process that the data syn-chronization for changing can be extracted from resource table, parameter list, resources relationship table
To in server info table.
So as to, after above step, the complete information of server is saved in final server info table,
When inquiring about in whole system, only inquire about in server info table, realize that the present invention mainly takes full advantage of trigger, storage
The database object collaborative work such as process, it is ensured that server info table can be closed at any time according to resource table, parameter list, auto correlation
It is that the change of table carrys out synchronized update.
Embodiments in accordance with the present invention, additionally provide a kind of processing meanss of SQL statement.
As shown in figure 3, processing meanss according to embodiments of the present invention include:
Acquisition module 31, for obtaining the modification information of resource table, resources relationship table, parameter list;
Triggering synchronization module 32, it is for according to modification information, triggering trigger, and according to trigger, modification information is same
Walk to server info table.
According to one embodiment of present invention, modification information includes:Addition information, deletion information, incidence relation change letter
Breath.
According to one embodiment of present invention, triggering synchronization module 32 includes:
Judge module (not shown), for according to modification information, judging whether trigger;
Trigger module (not shown), in the presence of trigger, triggering trigger;
Trigger module (not shown) is created, in the case of trigger is non-existent, creating trigger, and establishment is triggered
Trigger afterwards.
According to one embodiment of present invention, triggering synchronization module 32 includes:
Synchronization module (not shown) is called, for according to trigger, calling storing process, and according to storing process, will be become
More synchronizing information is to server info table.
In sum, by means of the above-mentioned technical proposal of the present invention, by obtaining resource table, resources relationship table, parameter list
Modification information, subsequently according to modification information, trigger trigger, and according to trigger, modification information is synchronized to into server letter
Breath table, by the object collaborative work for making full use of database, it is ensured that server info table can at any time according to resource table, from
Incidence relation table, the change of parameter list carry out synchronized update, so as to facilitate inquiry, and then improve query performance.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.
Claims (8)
1. a kind of processing method of SQL statement, it is characterised in that include:
Obtain resource table, resources relationship table, the modification information of parameter list;
According to the modification information, trigger is triggered, and according to the trigger, the modification information is synchronized to into server letter
Breath table.
2. processing method according to claim 1, it is characterised in that the modification information includes:Addition information, deletion letter
Breath, incidence relation modification information.
3. processing method according to claim 1, it is characterised in that according to the modification information, triggering trigger includes:
According to the modification information, the trigger is judged whether;
In the presence of the trigger, the trigger is triggered;
In the case of the trigger is non-existent, the trigger is created, and trigger the trigger after creating.
4. processing method according to claim 3, it is characterised in that according to the trigger, the modification information is same
Walking to server info table includes:
According to the trigger, storing process is called, and according to the storing process, the modification information is synchronized to into server
Information table.
5. a kind of processing meanss of SQL statement, it is characterised in that include:
Acquisition module, for obtaining the modification information of resource table, resources relationship table, parameter list;
Triggering synchronization module, for according to the modification information, triggering trigger, and according to the trigger, by the change
Synchronizing information is to server info table.
6. processing meanss according to claim 5, it is characterised in that the modification information includes:Addition information, deletion letter
Breath, incidence relation modification information.
7. processing meanss according to claim 5, it is characterised in that the triggering synchronization module includes:
Judge module, for according to the modification information, judging whether the trigger;
Trigger module, in the presence of the trigger, triggering the trigger;
Trigger module is created, in the case of the trigger is non-existent, creating the trigger, and is triggered after establishment
Trigger.
8. processing meanss according to claim 7, it is characterised in that the triggering synchronization module includes:
Synchronization module is called, for according to the trigger, calling storing process, and according to the storing process, by the change
More synchronizing information is to server info table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611200611.6A CN106599268A (en) | 2016-12-22 | 2016-12-22 | Processing method and device of SQL statement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611200611.6A CN106599268A (en) | 2016-12-22 | 2016-12-22 | Processing method and device of SQL statement |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106599268A true CN106599268A (en) | 2017-04-26 |
Family
ID=58602747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611200611.6A Pending CN106599268A (en) | 2016-12-22 | 2016-12-22 | Processing method and device of SQL statement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106599268A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577780A (en) * | 2017-09-13 | 2018-01-12 | 郑州云海信息技术有限公司 | A kind of data center's cloud resource synchronous method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673972A (en) * | 2004-08-04 | 2005-09-28 | 上海宝信软件股份有限公司 | Dynamic monitoring system and method for data base list update |
CN101000619A (en) * | 2006-12-25 | 2007-07-18 | 华为技术有限公司 | Data synchronous method and device based on SQL |
CN101075864A (en) * | 2007-07-16 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method for synchronizing and processing data, customer terminal equipment and servo |
CN102799634A (en) * | 2012-06-26 | 2012-11-28 | 中国农业银行股份有限公司 | Data storage method and device |
CN104572672A (en) * | 2013-10-15 | 2015-04-29 | 北大方正集团有限公司 | Heterogeneous database synchronization method and application system |
CN105320680A (en) * | 2014-07-15 | 2016-02-10 | 中国移动通信集团公司 | Data synchronization method and device |
-
2016
- 2016-12-22 CN CN201611200611.6A patent/CN106599268A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673972A (en) * | 2004-08-04 | 2005-09-28 | 上海宝信软件股份有限公司 | Dynamic monitoring system and method for data base list update |
CN101000619A (en) * | 2006-12-25 | 2007-07-18 | 华为技术有限公司 | Data synchronous method and device based on SQL |
CN101075864A (en) * | 2007-07-16 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method for synchronizing and processing data, customer terminal equipment and servo |
CN102799634A (en) * | 2012-06-26 | 2012-11-28 | 中国农业银行股份有限公司 | Data storage method and device |
CN104572672A (en) * | 2013-10-15 | 2015-04-29 | 北大方正集团有限公司 | Heterogeneous database synchronization method and application system |
CN105320680A (en) * | 2014-07-15 | 2016-02-10 | 中国移动通信集团公司 | Data synchronization method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577780A (en) * | 2017-09-13 | 2018-01-12 | 郑州云海信息技术有限公司 | A kind of data center's cloud resource synchronous method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2014348821B2 (en) | Location-based software updates | |
CN106301825B (en) | DPI rule generation method and device | |
CN103543902A (en) | Map display method for short message address | |
CN102291416A (en) | Two-way synchronizing method and system of client-side and server-side | |
CN105808609A (en) | Discrimination method and equipment of point-of-information data redundancy | |
CN103401763A (en) | Method and device for receiving group message and method and device for processing group message | |
CN104955096A (en) | Method and device for determining high-speed rail user | |
CN111694660B (en) | Cloud mobile phone data sending method, computer device and storage medium | |
CN103997771A (en) | System and method for achieving application and message triggering based on wireless access recognition technology | |
CN106020916A (en) | Method for updating application, terminal equipment and server | |
CN105278970A (en) | Data processing method, device and terminal | |
CN110291759B (en) | Task management method and system | |
CN105704177A (en) | UA identification method and device | |
CN111669717B (en) | Cloud mobile phone data sending method, computer device and storage medium | |
CN103761257A (en) | Webpage handling method and system based on mobile browser | |
US10033737B2 (en) | System and method for cross-cloud identity matching | |
CN106599268A (en) | Processing method and device of SQL statement | |
CN113901073A (en) | Data processing method, device and storage medium | |
CN110505290A (en) | A kind of synchronous method and device of contact information | |
CN103365892A (en) | Method and device for processing multiple contact objects | |
CN105634863A (en) | Application protocol detection method and device | |
WO2016029670A1 (en) | Set-top box data management method and set-top box | |
CN112269588A (en) | Algorithm upgrading method, device, terminal and computer readable storage medium | |
CN104765727A (en) | Text translation method and device | |
WO2017020748A1 (en) | Method and device for processing signalling tracking task |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170426 |