CN1904885A - Database adapter - Google Patents
Database adapter Download PDFInfo
- Publication number
- CN1904885A CN1904885A CN 200510088714 CN200510088714A CN1904885A CN 1904885 A CN1904885 A CN 1904885A CN 200510088714 CN200510088714 CN 200510088714 CN 200510088714 A CN200510088714 A CN 200510088714A CN 1904885 A CN1904885 A CN 1904885A
- Authority
- CN
- China
- Prior art keywords
- database
- data
- access module
- file
- module
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a new type data base adapter that is made up of database sound monitor, database access module, data packaging module and result collecting module. The sound monitor is used to monitor or poll the files in folder and analysis folder in file system sending buffer pool, and calling the database access module to take read and write operation to database. The result collecting module connects to the database access module and data packaging module. It is used to transform the result collecting and element data of different data base to universal XML format to shield the different of isomer database and transform the XML file to structurization SQL database language. The database access module would operate the database. The data package module is used to buffering application data and record path and size to record data.
Description
Technical field
The present invention relates to a kind of database adapter, refer to a kind of database adapter that is applied in the E-Government information exchange platform (being called for short the ACTIIP platform) especially.
Background technology
The ACTIIP platform is an information exchange platform of supporting the government affairs cooperation, and it supports the exchanges data between the different application systems as the important component part of electronic government affairs system.Exchanges data is the basic function of information exchange platform, and it has realized the transmission of the data security between the validated user arbitrarily on the platform.Exchanges data is the public channel that information resources are shared by the types of applications system.As the information exchange platform of supporting the government affairs cooperation; ACTIIP is based on unified security infrastructure (as password and CA); confidentiality, integrality, affirmation and the non-repudiation protection of data in exchanges data and business collaboration, have been realized; solved the safety mapping between different levels, the different platform, made up one complete, closely, consistent security system.
Adapter is as a module among the ACTIIP, provide upper layer application system and data interchange platform to carry out the access way of exchanges data, realized the interactive function of upper layer application and ACTIIP, the compatible well different operation system of upper layer application has realized data-switching, exchange and the integrated needs of system.In existing information system architecture, existed system and data can only be directly visited in new application, and a whenever newly-increased new application just needs the interface between foundation and a plurality of existed system.If changing appears in the data of certain existed system and interface, just must revise a large amount of programs that relate to.And by data integration just can be at the The data of existed system different adapters, satisfy the newly-increased needs of using.When existed system occur to change (as when new application requirements has new access way such as the socket interface), only need the corresponding adapter of adjustment to get final product, and can not influence other application system.
A kind of as in the adapter of database adapter can realize the integrated of application system and database and form translation function.But, because in the ACTIIP electronic government affairs system, application system and database between the different departments have nothing in common with each other, there is very big difference in different types of database, in order to shield the difference of disparate databases, make between the data of different types storehouse of different application systems and can carry out exchanges data, the work of simplified system, improve the efficient of operation, need a kind of novel database adapter to solve this problem.
Summary of the invention
In view of the foregoing, the purpose of this invention is to provide a kind of novel database adapter, this database adapter can shield the difference of disparate databases, integrates the data from the various forms of different system, disparate databases, realizes the data interaction between the different application systems.
For achieving the above object, the present invention by the following technical solutions: a kind of database adapter is characterized in that: this database adapter is made of database listener, database access module, data packer generic module and result set modular converter four parts; Wherein,
Database listener links to each other with file system, the file in the file in the main transmission Buffer Pool of being responsible in monitoring or the poll file system, the resolution file folder; Calling database access module operates database;
Database access module links to each other with database listener, database and result set modular converter; Database access module mainly is responsible for database is carried out the read and write operation;
The result set modular converter links to each other with the data packer generic module with database access module, main being responsible for converts the result set (record) and the metadata (data of descriptive data base table) of different pieces of information library inquiry the difference of unified XML form with the shielding heterogeneous database to, and the XML file conversion become structurized SQL database language, by database access module database is operated;
The data packer generic module links to each other with the result set modular converter, is mainly used in buffer memory application data, path that record data are deposited and the burst size of transfer files, burst to the application data in the data packaging group module is provided, reads, write operation.
Database adapter provided by the invention adopts JDBC technology access database by database access module, obtains the data result collection; By calling the result set modular converter result set sequence is changed into the XML file of semi-structured consolidation form again, formed one with the irrelevant general format of Database field, send to application system;
After database access module receives file, determine whether it is operation earlier to database; The result set modular converter is through behind the type checking then, and the XML file conversion that will meet consolidation form becomes SQL statement, by database access module data is inserted in the database.
Indulge the above, ACTIIP database adapter provided by the invention has following characteristics:
1, adopts JDBC technical operation data of different types storehouse, shield the difference of each database product.
2, convert unified semi-structured XML file to by structural data, improve the compatibility of system database.
3, by the data-switching of other form being become to meet the XML data of consolidation form, become SQL statement according to the XML data-switching again, database is carried out write operation, realize non-structured data are inserted database, strengthened the dirigibility of system.
4, database metadata can be converted to XML document and be transferred to remote data storehouse adapter, and carry out corresponding Jian Ku, build table handling, simplify the operation of system.
5, the operation of database is atomized operation and complex operations, complex operations realizes by the different atomic operation of combination.
Description of drawings
Fig. 1 is a database adapter inner structure synoptic diagram provided by the invention
Fig. 2 is the position relation of database adapter provided by the invention in the ACTIIP platform
Fig. 3 is a database adapter read data provided by the invention storehouse operational flowchart
Fig. 4 is a database adapter write data provided by the invention storehouse operational flowchart
Fig. 5 is the operational flowchart of the present invention to disparate databases
Fig. 6 is combined into the key diagram of complex operations for the database atomic operation
Embodiment
Can to carry out the exchange of different pieces of information database data by data interchange platform in order making between the different application systems, to the present invention proposes a kind of novel database adapter.As shown in Figure 1, this database adapter is made of database listener, database access module, data packer generic module and result set modular converter four parts.
Database listener links to each other with file system, the file in the file in the main transmission Buffer Pool of being responsible in monitoring or the poll file system, the resolution file folder.If when database listener finds to have in the file application system (as shown in Figure 2) notice will send data or write the file of data in database, then this document is resolved, calls database access module then database is operated.
Database access module links to each other with database listener, database and result set modular converter.Database access module mainly is responsible for database is carried out the read and write operation, as the data in the database are inquired about, read, with various data write in the database, operations such as data in the delete database.It is a general designation that database is carried out read operation, is divided into the band data and is not with two kinds of situations of data.The read operation of band data is meant: when data type is metadata or result set, so former data or result set are configured to the xml file, transmit, and its path is write the data packer class; The read operation with data is not meant: when data were simple SQL statement, spanned file did not directly write SQL statement the data packer class; Write data packing class is all wanted in two kinds of operations, and the data of reading all will send to application system.Write operation is meant that the data that will receive are inserted in the database.
The result set modular converter links to each other with the data packer generic module with database access module, main being responsible for converts the result set (record) and the metadata (data of descriptive data base table) of different pieces of information library inquiry the difference of unified XML form with the shielding heterogeneous database to, and the XML file conversion become structurized SQL database language, by database access module database is operated.
The data packer generic module links to each other with the result set modular converter, is mainly used in the buffer memory application data, as the data that from database, read with write data in the database, and the record data path of depositing and the burst size of transfer files.Burst to the application data in the data packaging group module is provided, operation such as reads, write.
Fig. 2 is the application synoptic diagram of database adapter provided by the invention in the ACTIIP platform.As shown in the figure, database adapter provided by the invention is as a kind of being arranged in the ACTIIP platform in the adapter, for the communication between upper layer application system and the database provides mutual interface.(promptly generate concrete adapter) after the database adapter instantiation, start by the adapter manager in the ACTIIP platform, when the database listener in the database adapter listens to when in the file system folder file being arranged, automatically resolve this document, by database access module database is operated then.
Fig. 3 is a database adapter read data provided by the invention storehouse operational flowchart.As shown in the figure,
1, at first, after database adapter starts, send the file in the Buffer Pool in the database listener monitoring application system (file system); After listening to this document folder, the interpolation affairs method of watcher thread calling platform engine generates new affairs, and the original state of affairs is set, and affairs are added in the corresponding formation, continues to monitor the transmission Buffer Pool then;
Database listener is resolved the file in this document folder; Call database access module database is carried out read operation;
2, have data in the file after the database access module judgement is resolved?
If do not have data in 3 files, database access module directly writes SQL statement in the data packer generic module, carries out for the 8th step;
If data are arranged in the file, further judge whether it is the Query Database operation? if not, then directly file conversion is become the XML file to send to the other side, the XML file path is write in the data packer generic module, carried out for the 8th step; If then down carry out;
4, connect database;
5, carry out query manipulation, obtain metadata or result set;
6, call the result set modular converter and convert result set to the XML file;
7, database access module sends to application system with the XML file;
8, revise transaction status, finish.
Data writing operation is another separate threads of engine control, and the data writing method of this thread dispatching adapter class (write () method) writes data.Because the XML document form is little than the relational data restriction, therefore must check the XML data that are about to warehouse-in.Inspection was divided into for two steps: at first, utilize XML Schema that the data form is done trial inspection, the XML Schema of use generates automatically according to the metadata of describing the relational database list structure; Secondly, utilize data element that the span of XML data is checked again, this point is that XML Schema can't accomplish.Promptly be considered to meet the data that form can be put in storage through the XML data of checking.The operation of XML data loading is actual to increase record according to the XML data to relational database exactly, is finished by database access module.
Detailed process as shown in Figure 4,
1, after database adapter starts, the adapter client is responsible for the monitoring reception Buffer Pool, as the other side's (the other side is exactly that side that you will communicate by letter with it) when sending file, adapter client resolution file also calls the thread of writing of engine, the write method of the data exchange module of writing the thread dispatching database adapter of engine;
2 if the operation in write data storehouse, then to 3; Otherwise directly file is given the upper layer application system;
3, connect database;
4, the result set modular converter generates SQL statement according to the XML file;
5, database access module is carried out SQL statement, doses new data in database;
6, revise transaction status, finish.
As shown in Figure 5, in order to realize read or write to distinct type data-base, database adapter provided by the invention adopts JDBC technology access data of different types storehouse, and, one and the corresponding mapping table of disparate databases field name in database adapter, have been done, the difference of shielding disparate databases realizes the operation to disparate databases.When application system writing management information and data message in shared resource, after the database adapter audiomonitor listened to, database adapter was carried out subsequent operation: by the JDBC accessing database, and obtain the data result collection; Then the result set sequence is changed into the XML file of semi-structured consolidation form, formed a general format that has nothing to do with Database field, send to the other side, thus the difference of shielding heterogeneous database; After the other side received file, database access module determined whether it is operation to database earlier, and database adapter is through behind the type checking then, and the XML file conversion that will meet consolidation form becomes SQL statement, and data are inserted in the database.Thereby, realize that the present invention shields the difference of disparate databases, integrate data from the various forms of different system, disparate databases, realize the purpose of data interaction between the different application systems.
As shown in Figure 6, the database access module of database adapter provided by the invention provides many atomic operations, as inquiry, insertion, deletion etc.When database adapter need be carried out complex operations to database, as database build table, table migration etc., database access module just with these atomic operations by the different order realization complex operations that combines.
Indulge the above, ACTIIP database adapter provided by the invention has following characteristics:
1, adopts JDBC technical operation data of different types storehouse, shield the difference of each database product.
2, convert unified semi-structured XML file to by structural data, improve the compatibility of system database.
3, by the data-switching of other form being become to meet the XML data of consolidation form, become SQL statement according to the XML data-switching again, database is carried out write operation, realize non-structured data are inserted database, strengthened the dirigibility of system.
4, database metadata can be converted to XML document and be transferred to remote data storehouse adapter, and carry out corresponding Jian Ku, build table handling, simplify the operation of system.
5, the operation of database is atomized operation and complex operations, complex operations realizes by the different atomic operation of combination.
Claims (4)
1, a kind of database adapter is characterized in that: this database adapter is made of database listener, database access module, data packer generic module and result set modular converter four parts; Wherein,
Database listener links to each other with file system, the file in the file in the main transmission Buffer Pool of being responsible in monitoring or the poll file system, the resolution file folder; Calling database access module operates database;
Database access module links to each other with database listener, database and result set modular converter; Database access module mainly is responsible for database is carried out the read and write operation;
The result set modular converter links to each other with the data packer generic module with database access module, main being responsible for converts the result set (record) and the metadata (data of descriptive data base table) of different pieces of information library inquiry the difference of unified XML form with the shielding heterogeneous database to, and the XML file conversion become structurized SQL database language, by database access module database is operated;
The data packer generic module links to each other with the result set modular converter, is mainly used in buffer memory application data, path that record data are deposited and the burst size of transfer files, burst to the application data in the data packaging group module is provided, reads, write operation.
2, database adapter according to claim 1 is characterized in that: described database access module carries out read operation to database and is divided into the band data and is not with two kinds of situations of data; The read operation of band data is meant that database metadata and record are read in the data packer generic module result set that will read from database or former data or other forms of file build becomes the xml file to transmit, and the path is write the data packer class; The operation with data is not that SQL statement is written to the data packer class; Write operation is meant that the data that will receive are inserted in the database.
3, database adapter according to claim 2 is characterized in that: described database access module passes through the JDBC accessing database, and obtains the data result collection; The result set modular converter changes into the XML file of semi-structured consolidation form with the result set sequence, formed one with the irrelevant general format of Database field, send to the other side;
After described database access module receives file, determine whether it is operation earlier to database; The result set modular converter is through behind the type checking then, and the XML file conversion that will meet consolidation form becomes SQL statement, and data are inserted in the database.
4, database adapter according to claim 1 is characterized in that: described database access module provides many atomic operations and complex operations, and complex operations realizes by these atomic operations are combined by different order.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200510088714 CN1904885A (en) | 2005-07-29 | 2005-07-29 | Database adapter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200510088714 CN1904885A (en) | 2005-07-29 | 2005-07-29 | Database adapter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1904885A true CN1904885A (en) | 2007-01-31 |
Family
ID=37674151
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200510088714 Pending CN1904885A (en) | 2005-07-29 | 2005-07-29 | Database adapter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1904885A (en) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101604237A (en) * | 2008-06-10 | 2009-12-16 | 中兴通讯股份有限公司 | A kind of system of accessing universal database |
CN101226497B (en) * | 2007-12-10 | 2011-06-22 | 金蝶软件(中国)有限公司 | Application program monitoring system and monitoring method |
CN102135978A (en) * | 2010-11-30 | 2011-07-27 | 广东星海数字家庭产业技术研究院有限公司 | Hot spot markup language (HSML) parsing method and system for converting markup languages into extensive markup language (XML) |
CN101697166B (en) * | 2009-10-28 | 2011-07-27 | 浪潮电子信息产业股份有限公司 | Method for accelerating data integration of heterogeneous platform |
CN102325161A (en) * | 2011-07-18 | 2012-01-18 | 北京航空航天大学 | A kind of XML sharding method based on the estimation of query amount |
CN102591725A (en) * | 2011-12-20 | 2012-07-18 | 浙江鸿程计算机系统有限公司 | Method for multithreading data interchange among heterogeneous databases |
CN102999537A (en) * | 2011-09-19 | 2013-03-27 | 阿里巴巴集团控股有限公司 | System and method for data migration |
CN103034703A (en) * | 2012-12-10 | 2013-04-10 | 江西省电力公司信息通信分公司 | Method for data exchange among multiple systems based on rule configuration |
CN103092872A (en) * | 2011-11-01 | 2013-05-08 | 镇江华扬信息科技有限公司 | XML (Extensive Makeup Language) technology based isomerous database access method |
CN103678575A (en) * | 2013-12-11 | 2014-03-26 | 四川九洲电器集团有限责任公司 | Method and system for achieving unified processing on multiple database data through middleware |
CN103945013A (en) * | 2013-01-17 | 2014-07-23 | 方正宽带网络服务股份有限公司 | Data transmission interface device and data transmission method |
CN104077340A (en) * | 2013-07-18 | 2014-10-01 | 腾讯科技(深圳)有限公司 | Database construction method and server |
CN106777368A (en) * | 2017-01-24 | 2017-05-31 | 北京奇虎科技有限公司 | Data base query language adaptation method and device, distributed data-storage system |
CN107451201A (en) * | 2017-07-06 | 2017-12-08 | 联动优势科技有限公司 | A kind of data access method and equipment |
CN108733708A (en) * | 2017-04-21 | 2018-11-02 | 国家计算机网络与信息安全管理中心 | Method, apparatus and computer storage media for information management |
CN109189394A (en) * | 2018-08-02 | 2019-01-11 | 山东浪潮通软信息科技有限公司 | A kind of method of adaptive domestic mainstream vendor's grain feelings data structure |
CN111651758A (en) * | 2020-06-08 | 2020-09-11 | 成都安恒信息技术有限公司 | Method for auditing result set of relational database of operation and maintenance auditing system |
US11256709B2 (en) | 2019-08-15 | 2022-02-22 | Clinicomp International, Inc. | Method and system for adapting programs for interoperability and adapters therefor |
-
2005
- 2005-07-29 CN CN 200510088714 patent/CN1904885A/en active Pending
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101226497B (en) * | 2007-12-10 | 2011-06-22 | 金蝶软件(中国)有限公司 | Application program monitoring system and monitoring method |
CN101604237A (en) * | 2008-06-10 | 2009-12-16 | 中兴通讯股份有限公司 | A kind of system of accessing universal database |
CN101697166B (en) * | 2009-10-28 | 2011-07-27 | 浪潮电子信息产业股份有限公司 | Method for accelerating data integration of heterogeneous platform |
CN102135978A (en) * | 2010-11-30 | 2011-07-27 | 广东星海数字家庭产业技术研究院有限公司 | Hot spot markup language (HSML) parsing method and system for converting markup languages into extensive markup language (XML) |
CN102325161A (en) * | 2011-07-18 | 2012-01-18 | 北京航空航天大学 | A kind of XML sharding method based on the estimation of query amount |
CN102999537A (en) * | 2011-09-19 | 2013-03-27 | 阿里巴巴集团控股有限公司 | System and method for data migration |
CN103092872A (en) * | 2011-11-01 | 2013-05-08 | 镇江华扬信息科技有限公司 | XML (Extensive Makeup Language) technology based isomerous database access method |
CN102591725A (en) * | 2011-12-20 | 2012-07-18 | 浙江鸿程计算机系统有限公司 | Method for multithreading data interchange among heterogeneous databases |
CN103034703A (en) * | 2012-12-10 | 2013-04-10 | 江西省电力公司信息通信分公司 | Method for data exchange among multiple systems based on rule configuration |
CN103945013A (en) * | 2013-01-17 | 2014-07-23 | 方正宽带网络服务股份有限公司 | Data transmission interface device and data transmission method |
CN104077340B (en) * | 2013-07-18 | 2016-06-01 | 腾讯科技(深圳)有限公司 | The establishment method of a kind of database and server |
CN104077340A (en) * | 2013-07-18 | 2014-10-01 | 腾讯科技(深圳)有限公司 | Database construction method and server |
CN103678575B (en) * | 2013-12-11 | 2016-03-02 | 四川九洲电器集团有限责任公司 | By the method and system of the unified process of Middleware implementation several data database data |
CN103678575A (en) * | 2013-12-11 | 2014-03-26 | 四川九洲电器集团有限责任公司 | Method and system for achieving unified processing on multiple database data through middleware |
CN106777368A (en) * | 2017-01-24 | 2017-05-31 | 北京奇虎科技有限公司 | Data base query language adaptation method and device, distributed data-storage system |
CN108733708A (en) * | 2017-04-21 | 2018-11-02 | 国家计算机网络与信息安全管理中心 | Method, apparatus and computer storage media for information management |
CN107451201A (en) * | 2017-07-06 | 2017-12-08 | 联动优势科技有限公司 | A kind of data access method and equipment |
CN107451201B (en) * | 2017-07-06 | 2020-12-04 | 联动优势科技有限公司 | Data access method and equipment |
CN109189394A (en) * | 2018-08-02 | 2019-01-11 | 山东浪潮通软信息科技有限公司 | A kind of method of adaptive domestic mainstream vendor's grain feelings data structure |
CN109189394B (en) * | 2018-08-02 | 2021-11-16 | 浪潮通用软件有限公司 | Method for self-adapting to grain situation data structure of domestic mainstream manufacturer |
US11256709B2 (en) | 2019-08-15 | 2022-02-22 | Clinicomp International, Inc. | Method and system for adapting programs for interoperability and adapters therefor |
US11714822B2 (en) | 2019-08-15 | 2023-08-01 | Clinicomp International, Inc. | Method and system for adapting programs for interoperability and adapters therefor |
CN111651758A (en) * | 2020-06-08 | 2020-09-11 | 成都安恒信息技术有限公司 | Method for auditing result set of relational database of operation and maintenance auditing system |
CN111651758B (en) * | 2020-06-08 | 2022-11-22 | 成都安恒信息技术有限公司 | Method for auditing result set of relational database of operation and maintenance auditing system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1904885A (en) | Database adapter | |
CN100401288C (en) | Distributed data source data integration system and method | |
CN105793843B (en) | The bind lines and column for memory database for OLTP and analysis workload stores | |
CA2555630C (en) | Integrated deployment of software projects | |
CN1945530A (en) | Arranging system and method for module having dependence | |
CN101067814A (en) | Mapping conversion method between data access level Xml format data and relational data | |
US20050071336A1 (en) | Systems and methods for logging and recovering updates to data structures | |
CN1968322A (en) | Web service finding and integration proxy system | |
CN104123392A (en) | Tool and method for transferring relational database to HBase | |
CN1881208A (en) | Construction method for dynamic structured query language statement | |
CN1295636C (en) | An efficient index structure to access hierarchical data in a relational database system | |
CN109213820B (en) | Method for realizing fusion use of multiple types of databases | |
CN1918572A (en) | Apparatus, system, method for enabling web-applications to access enterprise managed data | |
CN101043379A (en) | Network management apparatus and network management method | |
CN1716897A (en) | Be used to drive the client apparatus of remote user interface | |
CN1928873A (en) | System and method for database access for implementing load sharing | |
CN1933462A (en) | A mobile middleware and a method for processing business logic using it | |
CN1283063C (en) | Method and apparatus for layout data in communication equipment | |
CN101046811A (en) | Data integral service system and method | |
CN1717686A (en) | Automatic data consolidation | |
CN1282111C (en) | Across-platform data base researching method | |
CN1567248A (en) | Log recording method and system for application program | |
CN1633080A (en) | Method for implementing log in network management system | |
CN1416078A (en) | Data processing method of monitoring system | |
CN111651758B (en) | Method for auditing result set of relational database of operation and maintenance auditing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |