CN101488148A - Data compilation method in multiple databases - Google Patents
Data compilation method in multiple databases Download PDFInfo
- Publication number
- CN101488148A CN101488148A CNA2009100146017A CN200910014601A CN101488148A CN 101488148 A CN101488148 A CN 101488148A CN A2009100146017 A CNA2009100146017 A CN A2009100146017A CN 200910014601 A CN200910014601 A CN 200910014601A CN 101488148 A CN101488148 A CN 101488148A
- Authority
- CN
- China
- Prior art keywords
- result
- data
- database
- name
- databases
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method of arranging and collecting data from a plurality of databases. In the method, script description is used, isomorphic data arrangement is unitized, and heterogeneous data processing is specialized; a plurality of databases are numbered, rules are set in the script, own techniques of the databases are utilized simultaneously to complete the integrated processing of the data, and the real-time collection or timing collection of the data is finished through a real-time calling interface or through the binding with the timing event processing; the invention works during the report development of multi-database or the data intensive collection, and when in use, the method carries out the task description by a simple label script and supports the real-time or timing collection of the data from a plurality of databases. The method of arranging and collecting the data from a plurality of databases has the advantages of providing API finished data results for use, realizing the data template extraction of isomorphic databases, improving the developing efficiency and collecting the isomorphic and heterogeneous databases according to corresponding rules.
Description
Technical field
The present invention relates to a kind of Computer Applied Technology, use, can realize a plurality of data of database are put in order the technology that collects, develop the technical support that provides the foundation for form exploitation and data gather towards the professional and technical personnel.
Background technology
Business data can relate to numerous databases at present, the data in the associated databases is put in order, is collected need pay a large amount of time and cost.Present technique is distinguished purpose data classifying the data of isomorphism or isomery simultaneously by setting up a kind of data preparation flow process of standard, the isomorphism data of database is collected carry out templating, thereby reduce cost of development, improves the quality of exploitation.
Summary of the invention
The purpose of this invention is to provide a kind of method that data preparation collects of from a plurality of databases, carrying out.
The objective of the invention is to realize in the following manner, step is as follows:
1) use script describing, the data preparation of isomorphism is unitized, and the processing of isomeric data is becomed privileged;
2) a plurality of databases are numbered, and in script, set rule, the technology of utilizing database itself to carry is simultaneously finished the integrated processing of data, and handle by the real-time calling interface or with timed events and to bind, finish collecting in real time or regularly collecting of data;
3) play a role when the form exploitation of striding multiple database or data centralization gather, in use, carry out task description by the simple label script, concrete label script is as follows:
/ *---database configuration joint, for example: 0001..0002,0004,0006---*/--use comma to do connector between two accounts connection configuration numberings, if use ' .. ' connector, expression from XX number to XX number, represent 0001 such as 0001..0004,0002,0003,0004
<DATABASE>
</DATABASE>
/ *--result set configuration section---*/
The table name that/* 00 result deposits, must be with WDT_ beginning table */--need in current accounts, create a such entity list, wherein must comprise database numbering and database-name field, these two field systems are defaulted as respectively: DB_ID, if DB_NAME. do not adopt default value, build then that two field names of table correspondence must be with user-defined consistent as a result.
<RESULT_TABLE>
</RESULT_TABLE>
The condition of the data of/* 01 deletion respective table, NONE=do not carry out deletion */
<RESULT_DELETE_WHERE>
</RESULT_DELETE_WHERE>
/ * 02 is used to indicate the order of the deposit data row that collected out, the SQL of this order and last acquisition data be consistent */
<RESULT_COLUMN>
</RESULT_COLUMN>
/ * 03 is the field of expression database numbering in the table as a result, do not write the Cai Yong Summerside value of recognizing DB_ID*/
<RESULT_DB_ID_COLUMN>
DB_ID
</RESULT_DB_ID_COLUMN>
/ * 04 is the field of expression database-name in the table as a result, do not write the Cai Yong Summerside value of recognizing DB_NAME*/
<RESULT_DB_NAME_COLUMN>
DB_NAME
</RESULT_DB_NAME_COLUMN>
/ *---purpose data classifying process can be SQL, also can be the execution storing process, if increase step Sudden, uses the numbering area separately just passable---*/
<STEP1>
</STEP1>
<STEP2>
</STEP2>
/ *---result set obtains statement, can be SQL, also can be the execution storing process, but will notice that the order that is listed as can carry out corresponding with the result set row of front---*/
<RESULT_SQL>
</RESULT_SQL>
Function that has and beneficial effect
2. support from a plurality of databases, data to be carried out in real time or regularly collect gathering.
3. provide API to finish the use of data result.
4. can realize the templating of isomorphism data of database is extracted, improve development efficiency.
5. the database of isomery and isomorphism can be concentrated according to corresponding rule.
Embodiment
Configuration database connects, and finishes each connection that need collect database and points to.
Set up the middle table that the purpose data classifying script needs, contents such as storing process, configuration data collects script then.
In the form computing, call, or in timing services, call.
Script uses step as follows:
Function: from four different databases, collect department table:
The sql of the table as a result statement of being built:
CREATE?TABLE?WDT_RESULT
(
BMBH?VARCHAR(20)NULL,
BMMC?VARCHAR(60)NULL,
DB_ID?VARCHAR(20)NULL,
DB_NAME?VARCHAR(60)NULL
)
go
The purpose data classifying definitional part:
/ *---database configuration joint, for example: 0001..0002,0004,0006---*/
<DATABASE>
0001,0002,0003,0004
</DATABASE>
/ *--result set configuration section---*/
The table name that/* 00 result deposits, must be with WDT_ beginning table */
<RESULT_TABLE>
WDT_RESULT
</RESULT_TABLE>
The condition of the data of/* 01 deletion respective table, NONE=do not carry out deletion */
<RESULT_DELETE_WHERE>
</RESULT_DELETE_WHERE>
/ * 02 is used to indicate the order of the deposit data row that collected out, the SQL of this order and last acquisition data be consistent */
<RESULT_COLUMN>
BMBH,BMMC
</RESULT_COLUMN>
/ * 03 is the field of expression database numbering in the table as a result, do not write the Cai Yong Summerside value of recognizing DB_ID*/
<RESULT_DB_ID_COLUMN>
DB_ID
</RESULT_DB_ID_COLUMN>
/ * 04 is the field of expression database-name in the table as a result, do not write the Cai Yong Summerside value of recognizing DB_NAME*/
<RESULT_DB_NAME_COLUMN>
DB_NAME
</RESULT_DB_NAME_COLUMN>
/ *---result set obtains statement, can be SQL, also can be the execution storing process, but will note the order that is listed as
Can carry out corresponding with the result set row of front---*/
<RESULT_SQL>
SELECT?KCBMZD_BMBH,KCBMZD_BMMC?FROM?KCBMZD?GROUP?BY
KCBMZD_BMBH,KCBMZD_BMMC
</RESULT_SQL>
The main program assembly:
■ purpose data classifying processing components: n_cst_wd_multi_database
DLL (dynamic link library) method: public function integer of_exec_pre (string as_id, string
As_arg[], string as_data[]), the processing that is used to finish some purpose data classifying processes is called.
The data that ■ is relevant are built the table order:
CREATE?TABLE?WDCXDB(
F_ID VARCHAR (10) NOT NULL ,/* be used for unique identification corresponding database numbering */
F_NAME VARCHAR (100) NOT NULL, it is database where that/* is used to indicate, and refers generally to
The title * of bright factory/
F_TYPE VARCHAR (20) NOT NULL ,/* is used to indicate the type of database: ORACLE/
SYC/MSS/ODBC*/
F_SERVER VARCHAR (60) NOT NULL ,/* are used to indicate the server of database at current machine
Connection configuration * on the device/
F_DATABASE VARCHAR (60) NOT NULL ,/* be used to indicate be which database */
F_LOGID VARCHAR (60) NOT NULL ,/* login people */
F_PASSWORD VARCHAR (30) NULL ,/* login password */
F_BZ VARCHAR(200) NULL)
go
CREATE?UNIQUE?INDEX?I_WDCXDB?ON?WDCXDB(F_ID)
go
The purpose data classifying allocation list, the Script section is preserved by the data stream storage format.
CREATE?TABLE?WDCXPRE(
F_ID VARCHAR (10) NOT NULL, the numbering * of/* pre-treatment/
F_NAME VARCHAR (60) NOT NULL, the title * of/* pre-treatment/
F_AUTORUN CHAR (1) default ' 0 ' null ,/* whether move automatically */
F_RUNDIF u001 default 0 null, the interval of/* operation, unit be second a */
F_RUNLAST u001 default 0 null, the time of the last operation of/*, unit is
Second, rise start from */
F_RUNNEXT u001 default 0 null ,/* need next time the time * that moves/
F_BZ VARCHAR (200) null ,/* remarks */
F_LOCK CHAR (1) NULL ,/* whether locked */
F_CONT IMAGE NULL)/and the concrete content of *, use scale-of-two
The storage, but make be editing machine edit */
go
create?unique?index?I_WDCXPRE?on?WDCXPRE(F_ID)
go
Embodiment:
■ calls the report making that this technology is carried out the integration across database system in reporting system,
N_cst_jxc_pub_cx.of_pre_sql () invoke code is as follows:
...
// if carry out the integration across database purpose data classifying, so just carry out pre-treatment and return then.
if?left(upper(trim(ls_sql)),2)=’P:’then
n_cst_wd_multi_database?lnv_mul
lnv_mul=create?n_cst_wd_multi_database
get_token(ls_sql,’:’)
li_ret=lnv_mul.of_exec_Pre(ls_sql,is_sjlm,is_value)
destroy?lnv_mul
return?li_ret
end?if
….
■ calls this technology in timing services n_cst_msg_server service object:
■ instance variable: n_cst_wd_multi_database inv_mul//be used to the carry out purpose data classifying of many accounts
Handle
Invoke script part among the ■ method of_gen_message ():
......
Case ' PR ' // when for pre-treatment, call the mode of pre-treatment.
IF?INV_MUL.OF_EXEC_PRE(LS_COL,ls_p1,ls_p2)=1THEN
Sss=ls_pre+ ' carries out many accounts purpose data classifying and handles ['+ls_col+ '] success ~ r ~ n '
else
Sss=ls_pre+ ' carries out many accounts purpose data classifying and handles ['+ls_col+ '] failure: '+
inv_mul.is_error+’~r~n’
end?if
……。
Claims (1)
1. one kind is carried out the method that data preparation collects from a plurality of databases, it is characterized in that step is as follows:
1) use script describing, the data preparation of isomorphism is unitized, and the processing of isomeric data is becomed privileged;
2) a plurality of databases are numbered, and in script, set rule, the technology of utilizing database itself to carry is simultaneously finished the integrated processing of data, and handle by the real-time calling interface or with timed events and to bind, finish collecting in real time or regularly collecting of data;
3) play a role when the form exploitation of striding multiple database or data centralization gather, in use, carry out task description by the simple label script, concrete label script is as follows:
/ *---database configuration joint, for example: 0001..0002,0004,0006---*/--use comma to do connector between two accounts connection configuration numberings, if use ' .. ' connector, expression from XX number to XX number, represent 0001 such as 0001..0004,0002,0003,0004
<DATABASE>
</DATABASE>
/ *--result set configuration section---*/
The table name that/* 00 result deposits, must be with WDT_ beginning table */--need in current accounts, create a such entity list, wherein must comprise database numbering and database-name field, these two field systems are defaulted as respectively: DB_ID, if DB_NAME. do not adopt default value, build then that two field names of table correspondence must be with user-defined consistent as a result.
<RESULT_TABLE>
</RESULT_TABLE>
The condition of the data of/* 01 deletion respective table, NONE=do not carry out deletion */
<RESULT_DELETE_WHERE>
</RESULT_DELETE_WHERE>
/ * 02 is used to indicate the order of the deposit data row that collected out, the SQL of this order and last acquisition data be consistent */
<RESULT_COLUMN>
</RESULT_COLUMN>
/ * 03 is the field of expression database numbering in the table as a result, do not write adopt default value DB_ID*/
<RESULT_DB_ID_COLUMN>
DB_ID
</RESULT_DB_ID_COLUMN>
/ * 04 is the field of expression database-name in the table as a result, do not write adopt default value DB_NAME*/
<RESULT_DB_NAME_COLUMN>
DB_NAME
</RESULT_DB_NAME_COLUMN>
/ *---purpose data classifying process can be SQL, also can be the execution storing process, if increase step Sudden, uses the numbering area separately just passable---*/
<STEP1>
</STEP1>
<STEP2>
</STEP2>
/ *---result set obtains statement, can be SQL, also can be the execution storing process, but will notice that the order that is listed as can carry out corresponding with the result set row of front---*/
<RESULT_SQL>
</RESULT_SQL>。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2009100146017A CN101488148A (en) | 2009-02-25 | 2009-02-25 | Data compilation method in multiple databases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2009100146017A CN101488148A (en) | 2009-02-25 | 2009-02-25 | Data compilation method in multiple databases |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101488148A true CN101488148A (en) | 2009-07-22 |
Family
ID=40891038
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2009100146017A Pending CN101488148A (en) | 2009-02-25 | 2009-02-25 | Data compilation method in multiple databases |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101488148A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101923569A (en) * | 2010-07-09 | 2010-12-22 | 南京朗坤软件有限公司 | Storage method of structure type data of real-time database |
CN102402600A (en) * | 2011-11-18 | 2012-04-04 | 国电南瑞科技股份有限公司 | Asynchronous collection method for maintaining consistency of database copies |
CN102402555A (en) * | 2010-09-19 | 2012-04-04 | 上海众融信息技术有限公司 | Dynamic data reading and storing information processing method based on remote database |
CN101702161B (en) * | 2009-11-05 | 2012-07-04 | 金蝶软件(中国)有限公司 | Data extraction method, device and data management system |
CN105426525A (en) * | 2015-12-09 | 2016-03-23 | 浪潮通用软件有限公司 | Isomerous data integration method and device based on data storage |
CN105740316A (en) * | 2014-12-31 | 2016-07-06 | 商业对象软件有限公司 | Behaviorally consistent cluster-wide data wrangling based on locally processed sampled data |
CN106372219A (en) * | 2016-09-07 | 2017-02-01 | 大地风景(武汉)信息技术有限公司 | User behavior data association method and system based on heterogeneous platform |
-
2009
- 2009-02-25 CN CNA2009100146017A patent/CN101488148A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101702161B (en) * | 2009-11-05 | 2012-07-04 | 金蝶软件(中国)有限公司 | Data extraction method, device and data management system |
CN101923569A (en) * | 2010-07-09 | 2010-12-22 | 南京朗坤软件有限公司 | Storage method of structure type data of real-time database |
CN101923569B (en) * | 2010-07-09 | 2012-07-25 | 江苏瑞中数据股份有限公司 | Storage method of structure type data of real-time database |
CN102402555A (en) * | 2010-09-19 | 2012-04-04 | 上海众融信息技术有限公司 | Dynamic data reading and storing information processing method based on remote database |
CN102402600A (en) * | 2011-11-18 | 2012-04-04 | 国电南瑞科技股份有限公司 | Asynchronous collection method for maintaining consistency of database copies |
CN102402600B (en) * | 2011-11-18 | 2013-07-31 | 国电南瑞科技股份有限公司 | Asynchronous collecting method for maintaining consistency of database replicas |
CN105740316A (en) * | 2014-12-31 | 2016-07-06 | 商业对象软件有限公司 | Behaviorally consistent cluster-wide data wrangling based on locally processed sampled data |
CN105426525A (en) * | 2015-12-09 | 2016-03-23 | 浪潮通用软件有限公司 | Isomerous data integration method and device based on data storage |
CN106372219A (en) * | 2016-09-07 | 2017-02-01 | 大地风景(武汉)信息技术有限公司 | User behavior data association method and system based on heterogeneous platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101488148A (en) | Data compilation method in multiple databases | |
CN106649378B (en) | Data synchronization method and device | |
CN104933160B (en) | A kind of ETL frame design method towards safety monitoring business diagnosis | |
CN105164674A (en) | Queries involving multiple databases and execution engines | |
CN105243528A (en) | Financial IT system graphical centralized reconciliation system and method under big data environment | |
CN102508919B (en) | Data processing method and system | |
CN109086410A (en) | The processing method and system of streaming mass data | |
CN101944114A (en) | Data synchronization method between memory database and physical database | |
CN105574667A (en) | Nuclear power design data integration method and system | |
CN111563130A (en) | Data credible data management method and system based on block chain technology | |
CN113204465B (en) | Micro-service extraction method based on execution tracking | |
CN113704077B (en) | Test case generation method and device | |
CN106055325A (en) | Establishing method of service for supporting concurrent operation of multiple systems | |
CN107423390A (en) | A kind of real time data synchronization algorithm based on inside OLTP OLAP mixed relationship type Database Systems | |
CN102902777A (en) | Cross data source inquiry device and cross data source inquiry method | |
CN103092866A (en) | Data monitoring method and monitoring device | |
CN108628600A (en) | Software dynamic behavior modeling method and apparatus based on control flow analysis | |
CN103971211A (en) | Information processing method and device | |
CN105589900A (en) | Data mining method based on multi-dimensional analysis | |
CN103077019A (en) | Batch maintenance method and device for graphical parameters | |
CN101359324A (en) | Data access method of oracle relational database based on procedure call interface | |
CN111125045B (en) | Lightweight ETL processing platform | |
CN107329998A (en) | User's increment class data capture method, device and equipment | |
CN102339305A (en) | Database cluster failure recovery method on basis of partial ordering relation logs | |
CN112395343B (en) | DSG-based field change data acquisition and extraction method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20090722 |