CN102546810A - Remote access method of database - Google Patents
Remote access method of database Download PDFInfo
- Publication number
- CN102546810A CN102546810A CN2012100145514A CN201210014551A CN102546810A CN 102546810 A CN102546810 A CN 102546810A CN 2012100145514 A CN2012100145514 A CN 2012100145514A CN 201210014551 A CN201210014551 A CN 201210014551A CN 102546810 A CN102546810 A CN 102546810A
- Authority
- CN
- China
- Prior art keywords
- database
- client
- gateway server
- xml message
- server end
- 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 Transfer Between Computers (AREA)
Abstract
The invention discloses a remote access method of a database, comprising the following steps: a driving client packages a client access request into an xml message in s WebService format, and transmits the xml message to a database gateway server side; the gateway server side resolves the xml message into a corresponding database operation and query command in s WebService format; the gateway server side executes corresponding database operation at the server side so as to obtain an execution result of the operation and query command; the gateway server side packages the execution result into an xml message in a WebService format and feeds back the xml message to a driving client; and the driving client extracts the result after resolving the received xml message in the WebService format. The driving client and the gateway server side access the database server indirectly, so that the security of the database is ensured, and a Java program can remotely access the database reliably and conveniently.
Description
Technical field
The present invention relates to database technical field, be specifically related to a kind of remote access method of database.
Background technology
Java application remote access relevant database (RDB) has two kinds of methods, uses JDBC (Java Data Base Connectivity, the java database connects) directly to connect database through telecommunication network, or passes through middleware.The former can be directly exposed to database on the network, brings potential safety hazard, and the latter might need to programme to different middleware interface, brings the extra work amount.
JDBC (Java Data Base Connectivity; The java database connects) be a kind of SQL (Structured Query Language that is used to carry out; SQL) the Java API of statement (Application Programming Interface; API), can unified visit be provided for multiple relational database, it is made up of one group of class and interface of writing with Java language.JDBC provides a kind of benchmark, can make up more senior instrument and interface in view of the above, makes the database development personnel can write database application.
Summary of the invention
The present invention provides a kind of remote access method of database, can unified calling interface can be provided through middleware, and can avoid database directly to expose on the network and the potential safety hazard of bringing again.
The present invention provides a kind of remote access method of database, comprising: comprise step:
A: drive client the client access request is packaged into the xml message of Web Service form, the xml message is sent to the DataBase Gateway server end;
B: the gateway server end is corresponding database operation, querying command with the form of Web Service with the xml packet parsing;
C: the gateway server end is carried out the corresponding database operation at server end, obtains the execution result of operation, querying command;
D: the gateway server end is packaged into the xml message with execution result with Web Service form and returns to the driving client, drive client with the format analysis of xml message that receives with Web Service after, extract the result.
Preferably, also comprise steps A 0 before the said steps A: application program drives the driving of client through unified API Calls.
Preferably, in the said steps A, the xml message passes through the http agreement by driving client transmissions to the gateway server end.
Preferably, among the said step D, the xml message is transferred to the driving client through the http agreement by the gateway server end.
Technique scheme can be found out; Because the embodiment of the invention adopts driving client and gateway server end indirectly the server of database to be conducted interviews; And client access request and database execution result be packaged into the xml message with Web Service form and transmit driving between client and the gateway server end with the http agreement, therefore adopts this data-base remote access method of the present invention can make java applet remote access data storehouse become safe, reliable and easy.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the principle schematic of remote access method of a kind of database of the embodiment of the invention;
Fig. 2 is the flow chart of remote access method of a kind of database of the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making all other embodiment that obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment:
The embodiment of the invention provides a kind of remote access method of database, comprising: comprise step:
A: drive client the client access request is packaged into the xml message of Web Service form, the xml message is sent to the DataBase Gateway server end;
B: the gateway server end is corresponding database operation, querying command with the form of Web Service with the xml packet parsing;
C: the gateway server end is carried out the corresponding database operation at server end, obtains the execution result of operation, querying command;
D: the gateway server end is packaged into the xml message with execution result with Web Service form and returns to the driving client, drive client with the format analysis of xml message that receives with Web Service after, extract the result.
Below in conjunction with Fig. 1, Fig. 2 the remote access method of the database that the embodiment of the invention provides is made concrete introduction.
As shown in Figure 1, in the remote access system of entire database, the embodiment of the invention has comprised application program, has driven client, gateway server end and database, it is understandable that, at the gateway server end.The gateway server end is that the J2EE Web of standard uses, and is responsible for and drives communicating by letter of client, and realization is to the operation and the inquiry of the remote access database of needs.System's installation requirements are following:
Operating system: Windows XP, Windows Vista, Windows 7, Windows 2003 Server, Windows 2008 Server or Linux (version after the kernel 2.2)
JDK?1.6
Database: Oracle 8i, 9i, 10g, 11g, SQL Server, MySQL 4 or MySQL 5
J2EE application server: Tomcat, JBoss, Glassfish or WebLogic.
Driving client is the JDBC driver of standard, under the JDK1.6 environment, can well move.Application program can be driven client call by the standard interface of JDBC, realizes the visit to remote data base through network.
As shown in Figure 2, at first execution in step 101: application program drives the driving of client through unified API Calls.API (Application Programming Interface; API) is some predefined functions; Purpose provide application program and developer based on certain software or hardware to visit the ability of one group of routine; And need not to visit source code, or understand the details of internal work mechanism.Application program described in this step is the application program that the third party develops; This application program can be in operating system drives the driving of client through unified API Calls; And then startup drives the operation of client; For the ease of operation, this application program can be designed as the visualized operation interface, and operating personnel in the interface, import request instruction through visual operation interface or the instruction of other associative operations gets final product.
Step 102: drive client the client access request is packaged into the xml message of Web Service form, the xml message is sent to the DataBase Gateway server end through the http agreement.Web Service is based on modular assembly network, distributed, and it carries out specific task, observes concrete technical specification, and these standards make Web Service to carry out interoperability with other compatible assemblies.Web Service can use the Internet protocol of standard, like HTTP http, and can use extend markup language xml, and function embodiment is online in the Internet and enterprises.Web Service platform is a cover standard, and it has defined application program and how on Web, to have realized interoperability.
Step 103: the gateway server end is corresponding database operation, querying command with the form of Web Service with the xml packet parsing.Xml (Extensible Markup Language; Extend markup language) being used for the electroactive marker subfile makes it have structural SGML; Can be used for flag data, definition of data type, the original language that to be a kind of user of permission define oneself SGML.Xml is the subclass of standard generalized markup language (SGML), is fit to very much the Web transmission.Xml provides unified method to describe and exchange the structural data that is independent of application program or supplier.The xml message of Web Service meets SOAP standard (Simple Object Access Protocol, Simple Object Access Protocol) in the embodiment of the invention.
Step 104: the gateway server end is carried out the corresponding database operation at server end, obtains the execution result of operation, querying command.Database manipulation is a standard JDBC sql command in the embodiment of the invention, and concrete operations comprise database refresh, database deletion, data base querying etc.
Step 105: the gateway server end is packaged into the xml message with execution result with Web Service form, returns to the driving client through the http agreement, drive client with the format analysis of xml message that receives with Web Service after, extract the result.This result comprises the result of database manipulation and/or the result set of data base querying.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to accomplish through program; This program can be stored in the computer-readable recording medium; Storage medium can comprise: read-only memory (ROM; Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
Adopt the http agreement to carry out transfer of data in the embodiment of the invention, therefore the remote access scope of database has been obtained expansion; Driving client and gateway server end conducts interviews to the server of database indirectly; Ensured the safety of database; Be packaged into the xml message for client access request and database execution result with Web Service form and transmit driving between client and the gateway server end with the http agreement again, make java applet remote access data storehouse become safe, reliable and easy.
More than the remote access method of a kind of database that the embodiment of the invention provided has been carried out detailed introduction; Used concrete example among this paper principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.
Claims (4)
1. the remote access method of a database is characterized in that, comprises step:
A: drive client the client access request is packaged into the xml message of Web Service form, the xml message is sent to the DataBase Gateway server end;
B: the gateway server end is corresponding database operation, querying command with the form of Web Service with the xml packet parsing;
C: the gateway server end is carried out the corresponding database operation at server end, obtains the execution result of operation, querying command;
D: the gateway server end is packaged into the xml message with execution result with Web Service form and returns to the driving client, drive client with the format analysis of xml message that receives with Web Service after, extract the result.
2. the remote access method of a kind of database as claimed in claim 1 is characterized in that: also comprise steps A 0 before the said steps A: application program is through the driving of unified API Calls driving client.
3. according to claim 1 or claim 2 a kind of remote access method of database is characterized in that: in the said steps A, the xml message through the http agreement by driving client transmissions to the gateway server end.
4. according to claim 1 or claim 2 a kind of remote access method of database, it is characterized in that: among the said step D, the xml message is transferred to the driving client through the http agreement by the gateway server end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012100145514A CN102546810A (en) | 2012-01-16 | 2012-01-16 | Remote access method of database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012100145514A CN102546810A (en) | 2012-01-16 | 2012-01-16 | Remote access method of database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102546810A true CN102546810A (en) | 2012-07-04 |
Family
ID=46352756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012100145514A Pending CN102546810A (en) | 2012-01-16 | 2012-01-16 | Remote access method of database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102546810A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103442075A (en) * | 2013-09-04 | 2013-12-11 | 珠海金山网络游戏科技有限公司 | Method for remote call |
CN103677810A (en) * | 2013-11-21 | 2014-03-26 | 金蝶软件(中国)有限公司 | Service mobile application system and application method thereof |
CN103716356A (en) * | 2012-10-09 | 2014-04-09 | 三亚中兴软件有限责任公司 | Storage process operation method, device and system based on Web |
CN104363165A (en) * | 2014-11-14 | 2015-02-18 | 华东电网有限公司 | Information interactive system under internal and external network isolation environment and data integrating method |
CN104506606A (en) * | 2014-12-19 | 2015-04-08 | 苏州卫生职业技术学院 | Method for embedded device to access remote database |
CN105930431A (en) * | 2016-04-19 | 2016-09-07 | 北方工业大学 | Method, device and system for accessing database |
CN109218426A (en) * | 2018-09-19 | 2019-01-15 | 福建南威软件有限公司 | A kind of API gateway method of servicing for supporting webservice agreement to call |
CN109634752A (en) * | 2018-10-26 | 2019-04-16 | 北京市天元网络技术股份有限公司 | A kind of client request processing method and system based on page gateway |
CN110413676A (en) * | 2019-07-25 | 2019-11-05 | 中国工商银行股份有限公司 | The access method and its device of database, electronic equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833620A (en) * | 2010-04-28 | 2010-09-15 | 国网电力科学研究院 | Custom security JDBC driver-based database protective method |
CN101853274A (en) * | 2010-05-10 | 2010-10-06 | 浪潮电子信息产业股份有限公司 | Method for realizing interconnection of heterogeneous databases |
CN101226497B (en) * | 2007-12-10 | 2011-06-22 | 金蝶软件(中国)有限公司 | Application program monitoring system and monitoring method |
US20110307543A1 (en) * | 2010-06-14 | 2011-12-15 | Richard Allen Megginson | Servicing database operations using a messaging server |
-
2012
- 2012-01-16 CN CN2012100145514A patent/CN102546810A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101226497B (en) * | 2007-12-10 | 2011-06-22 | 金蝶软件(中国)有限公司 | Application program monitoring system and monitoring method |
CN101833620A (en) * | 2010-04-28 | 2010-09-15 | 国网电力科学研究院 | Custom security JDBC driver-based database protective method |
CN101853274A (en) * | 2010-05-10 | 2010-10-06 | 浪潮电子信息产业股份有限公司 | Method for realizing interconnection of heterogeneous databases |
US20110307543A1 (en) * | 2010-06-14 | 2011-12-15 | Richard Allen Megginson | Servicing database operations using a messaging server |
Non-Patent Citations (1)
Title |
---|
蒋念平等: "实时Web数据库中间件的研究", 《上海理工大学学报》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103716356A (en) * | 2012-10-09 | 2014-04-09 | 三亚中兴软件有限责任公司 | Storage process operation method, device and system based on Web |
CN103716356B (en) * | 2012-10-09 | 2018-02-27 | 三亚中兴软件有限责任公司 | Storing process operating method, device and system based on web |
CN103442075A (en) * | 2013-09-04 | 2013-12-11 | 珠海金山网络游戏科技有限公司 | Method for remote call |
CN103442075B (en) * | 2013-09-04 | 2017-03-29 | 珠海金山网络游戏科技有限公司 | A kind of method of far call |
CN103677810A (en) * | 2013-11-21 | 2014-03-26 | 金蝶软件(中国)有限公司 | Service mobile application system and application method thereof |
CN103677810B (en) * | 2013-11-21 | 2018-06-01 | 金蝶软件(中国)有限公司 | Business mobile application system and its application process |
CN104363165A (en) * | 2014-11-14 | 2015-02-18 | 华东电网有限公司 | Information interactive system under internal and external network isolation environment and data integrating method |
CN104506606A (en) * | 2014-12-19 | 2015-04-08 | 苏州卫生职业技术学院 | Method for embedded device to access remote database |
CN105930431A (en) * | 2016-04-19 | 2016-09-07 | 北方工业大学 | Method, device and system for accessing database |
CN109218426A (en) * | 2018-09-19 | 2019-01-15 | 福建南威软件有限公司 | A kind of API gateway method of servicing for supporting webservice agreement to call |
CN109634752A (en) * | 2018-10-26 | 2019-04-16 | 北京市天元网络技术股份有限公司 | A kind of client request processing method and system based on page gateway |
CN110413676A (en) * | 2019-07-25 | 2019-11-05 | 中国工商银行股份有限公司 | The access method and its device of database, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102546810A (en) | Remote access method of database | |
US8904343B2 (en) | Adding services to application platform via extension | |
US8555249B2 (en) | Lifecycle stable user interface adaptations | |
CN101697139B (en) | Method, device and registry for remote procedure call | |
Vogel et al. | Experiences on migrating RESTful web services to GraphQL | |
US11513775B2 (en) | Group control and management among electronic devices | |
CN103077024B (en) | A kind of device and method supporting the on-demand customization of SaaS application flow and operation | |
CN106415548B (en) | Computing platform for integrated design of products, materials and manufacturing processes | |
CN103473108A (en) | Java code generating method | |
US9531830B2 (en) | Odata offline cache for mobile device | |
CA2533942A1 (en) | Platform for data services across disparate application frameworks | |
US20120089931A1 (en) | Lightweight operation automation based on gui | |
CN104821954A (en) | Cross-platform remote procedure call method | |
Li | RESTful Web service frameworks in Java | |
CN105095449A (en) | Method for converting HTML webpage to mobile terminal page | |
CN105786913A (en) | Cloud manufacturing platform oriented ERP integrated database service interface encapsulation system and method | |
US9491266B2 (en) | Representational state transfer communications via remote function calls | |
CN102591724A (en) | Method and device for information interaction | |
CN103338135A (en) | Real-time monitoring method of cluster storage capacity | |
CN102801700A (en) | Forwarding data from server to device | |
CN104182228A (en) | Method and system for creating network applications | |
CN104270403A (en) | Cloud platform information web monitoring system based on struts2 framework | |
CN102520963A (en) | Method and system for realizing service logic processing based on strongly-typed relation mapping | |
WO2009055759A2 (en) | Declarative model interpretation | |
CN102609299A (en) | Virtualizing system, and creating method and creating device thereof |
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 |
Application publication date: 20120704 |