CN102760164B - A kind of method of exchanges data between relational database management system and XML data base management system - Google Patents

A kind of method of exchanges data between relational database management system and XML data base management system Download PDF

Info

Publication number
CN102760164B
CN102760164B CN201210193861.7A CN201210193861A CN102760164B CN 102760164 B CN102760164 B CN 102760164B CN 201210193861 A CN201210193861 A CN 201210193861A CN 102760164 B CN102760164 B CN 102760164B
Authority
CN
China
Prior art keywords
management system
data base
xml
relational database
base management
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.)
Expired - Fee Related
Application number
CN201210193861.7A
Other languages
Chinese (zh)
Other versions
CN102760164A (en
Inventor
赵伟
郑程光
孙伟丰
罗正海
李泉
李�浩
李书淦
程仁波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Founder Digital Publishing Technology (Shanghai) Co.,Ltd.
Founder Information Industry Holdings Co Ltd
Peking University Founder Group Co Ltd
Original Assignee
FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD
Founder Information Industry Holdings Co Ltd
Peking University Founder Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD, Founder Information Industry Holdings Co Ltd, Peking University Founder Group Co Ltd filed Critical FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD
Priority to CN201210193861.7A priority Critical patent/CN102760164B/en
Publication of CN102760164A publication Critical patent/CN102760164A/en
Application granted granted Critical
Publication of CN102760164B publication Critical patent/CN102760164B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides the method for exchanges data between a kind of relational database management system and XML data base management system.Technical scheme of the present invention can allow data exchange between relational database management system and XML data base management system, and the data upgraded in management data base management system, the user being can be original under the prerequisite of relational database management system in reservation, introduce the data source of XML data base management system as new infosystem, remain while playing fresh information system value historical data and use value, maintain the interoperability of two kinds of operating systems simultaneously.

Description

A kind of method of exchanges data between relational database management system and XML data base management system
Technical field
The present invention relates to field of computer technology, particularly a kind of method of exchanges data between relational database management system and XML data base management system.
Background technology
XML(full name ExtensibleMarkupLanguage), be a kind of be specially internet and a kind of markup language of designing, and due to its ability that there are the various information of effectively expressing, data and make various applicating cooperation work, already became the de facto standard of data publication and exchanges data, therefore, XML to be developed in recent years and to apply widely.The emphasis of XML does not lie in the form of data itself, and is management data information, and therefore, XML makes the unification of disparate databases pattern become possibility, for the integration problem of heterogeneous database provides approach.
XML data base management system (XMLDBMS) is also development in recent years a kind of novel data base management system (DBMS) rapidly, and it to store and retrieval meets the data base management system (DBMS) that the XML document data of W3C standard are target, and can upgrade XML document.Due to its store to as if XML document storehouse, therefore XMLDBMS is exactly a kind of XML document storehouse in essence.
XML data base management system (XMLDBMS) is a kind of novel data base management system (DBMS) (DBMS) fast-developing in recent years, and it stores and the data of retrieval are XML document, and supports to upgrade XML document.Along with XML standard is adopted as data exchange standard by increasing industry, the management of XML data (stores, retrieval, upgrades) demand can maintain sustained and rapid growth, and particularly XMLDBMS is applicable to process text class data and XML document data more than relational database management system.And relational database management system (relational database management system) is due to decades in the widespread use of IT industry, no matter can not shake in market or its leading position of technical elements, and compare XMLDBMS, relational database management system has superiority more when dealing with relationship data.So above the DBMS market in future, XMLDBMS will with relational database management system (relational database management system) Long Coexistence.In various enterprise and other unit, XMLDBMS and relational database management system long-term co-existence will be there is and the situation of collaborative work.
Query engine is the kernel subsystems in data base management system (DBMS) (DBMS), because XML is typical semi-structured data, traditional database is different to the search request of XML data, not only the numerical value in database to be inquired about when inquiring about, and will the relation between the structure of XML document and data be inquired about.Along with the further investigation of XML correlation technique, XML inquires about has possessed solid technical foundation on this basis, W3CWorldWideWebConsortium proposes XML query language specification working draft-XQuery language Dec calendar year 2001, up to now, XQuery language is always in constantly developing.W3C is that the data model of XQuery query language definition becomes XQueryDataModel(XDM), it is a kind of data model based on sequence, and namely in XQuery, arbitrary data is all a sequence, and sequence is made up of several orderly project (item's); An item is a value of atom or a node; A node is one of 7 kinds of nodes of XML document (document node, node element, attribute node, text node, name space node, comment nodes, processing instruction nodes).In this XMLDBMS, use node data table to store document node and node element, all the other 5 kinds of nodes are stored in the data line of its father's node element.
At present, the XML data managerial ability not having Native due to the traditional relational database management system being deployed in user's machine room does not in a large number understand XMLDBMS completely yet, so user cannot push away in relational database management system inside or draw data from XMLDBMS; But but can push away data conversely in XMLDBMS draws data to XMLDBMS to relational database management system or from relational database management system, this needs XMLDBMS to support to carry out with relational database management system the function of exchanges data.
In order to allow XMLDBMS and relational database management system collaborative work, need a kind of mechanism of carrying out exchanges data between these two kinds of DBMS systems.
Summary of the invention
For solving the problem, the method for exchanges data between a kind of relational database management system that technical solution of the present invention provides and XML data base management system, comprising:
Step S1 a: built-in function is set in the query engine of described XML data base management system;
Step S2: by described built-in function by described XML data base management system with described relational database management system is connected, and by described built-in function, the data query of XML data base management system and update request are sent in described relational database management system;
Step S3: request results is back to described XML data base management system by described relational database management system;
Step S4: described request results is converted into the XML document fragment with the set form preset by described XML data base management system;
Step S5: the XML document fragment described in parsing.
Alternatively, XML data base management system is connected with by described relational database management system by connection string by described built-in function.
Alternatively, described connection string comprises URL/IP+ port numbers, database name, user name, the encrypted message of relationship by objective (RBO) data base management system (DBMS).
Alternatively, in described step S2, data query and the update request of described XML data base management system are sent to described relational database management system with the form of SQL statement.
Alternatively, in described step S3, request results is back to described XML data base management system with the form of relation table by described relational database management system.
Alternatively, in described step S4, by described built-in function, described request results conversion is become XML document fragment.
Alternatively, described step S5 is specially: described XML document fragment is delivered to XML document resolver, and described XML document fragment is split into XDM node element by described XML document resolver, and is stored in a transient node table by described XDM node element.
Alternatively, the described XML document fragment with set form is the XDM of the XML node element composition of some row by name, described row nodename is fixed, inside comprises some daughter element nodes, described row node corresponds to a line in described relation table, and the daughter element node of described row node is corresponding to the row in a line in described relation table.
Alternatively, described daughter element node has and only has the attribute of one " type " by name, and described property value is the data type of described relation table respective column.
Alternatively, described daughter element node has and only has a text child node, and the title of described each child node is corresponding with the row name that described relation table respectively arranges.
Compared with prior art, technique scheme has lower advantage:
Technical scheme of the present invention can allow data exchange between relational database management system and XML data base management system, and the data upgraded in management data base management system, the user being can be original under the prerequisite of relational database management system in reservation, introduce the data source of XML data base management system as new infosystem, remain while playing fresh information system value historical data and use value, maintain the interoperability of two kinds of operating systems simultaneously.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for exchanges data between the relational database management system of embodiment of the present invention and XML data base management system.
Fig. 2 is the method schematic diagram of exchanges data between the relational database management system of embodiments of the present invention and XML data base management system.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage more become apparent, and are described in detail the specific embodiment of the present invention below in conjunction with accompanying drawing.Set forth detail in the following description so that fully understand the present invention.But the present invention can be different from alternate manner described here to implement with multiple, those skilled in the art can when without prejudice to doing similar popularization when intension of the present invention.Therefore the present invention is not by the restriction of following public embodiment.
Those skilled in the art will appreciate that relational database management system is administrative relationships databases, and be the system of relevant row and column by Organization of Data, it was used widely in IT industry already.XML data base management system mainly processes and what organize is text data and XML document data.Compared to XML data base management system, relational database management system organize and deal with relationship type data time there is the advantage hardly matched.But, because relational database management system does not have local XML data managerial ability, mutual exchanges data cannot be realized between the two.
For solving the problems of the prior art, the present inventor, through research, proposes the method for exchanges data between a kind of relational database management system and XML data base management system.Consult Fig. 1, Fig. 1 is the process flow diagram of the method for exchanges data between the relational database management system of embodiment of the present invention and XML data base management system.The method of exchanges data between the relational database management system of embodiment of the present invention and XML data base management system, comprising:
Step S1 a: built-in function is set in the query engine of described XML data base management system;
Step S2: described XML data base management system and described relational database management system are connected by described built-in function, and by described built-in function, the data query of XML data base management system and update request are sent in described relational database management system;
Step S3: request results is back to described XML data base management system by described relational database management system;
Step S4: described request results is converted into the XML document fragment with set form by described XML data base management system;
Step S5: the XML document fragment described in parsing.
Consult Fig. 2, Fig. 2 is the method schematic diagram of exchanges data between the relational database management system of embodiments of the present invention and XML data base management system.The method of exchanges data between a kind of relational database management system of embodiments of the present invention and XML data base management system is specifically introduced preferred embodiment below in conjunction with Fig. 2.
First, enter step S1: in the query engine kernel of XML data base management system, realize a built-in function, described built-in function is for receiving two parameters: connection string and SQL query statement, and returns the XML document fragment with set form.Wherein, connection string comprises the URL/IP+ port numbers of relational database management system, database name, the information such as username and password, the connection protocol (such as, the privately owned connection protocol of ODBC or other specific relational database management systems) of relational database management system is used to be connected with relational database management system for XML data base management system.
Enter step S2: by described built-in function by described XML data base management system with described relational database management system is connected, and by described built-in function, the data query of XML data base management system and update request are sent in described relational database management system;
Enter step S3: request results is back to described XML data base management system by described relational database management system.Wherein, request results that relational database management system returns using the form of relation table (single atomic data also will as relation table process), therefore, needs relation table to be converted into the XML data that XML data base management system can identify.
Enter step S4: described request results is converted into the XML document fragment with set form by described XML data base management system.Wherein, relation table is converted into the XML document fragment with the set form preset by the built-in function in XML data base management system.The XML document fragment of set form that what described built-in function returned have is as follows:
By above-mentioned XML document, we can find out:
What built-in function returned is the sequence (XQuery data model) that some names are called the XML node element composition of row;
Each described row node corresponds to a line of the relation table of the result that relational database management system returns, and the title of row node is fixing;
Row node contains several daughter element nodes, corresponds respectively to a row (field) of corresponding line in the relation table of the result that relational database management system returns;
The daughter element node of row node have and only have one be called " type " and attribute, its property value is the data type of the respective column of the relation table that relational database management system returns; The daughter element node of row node has and only has a text child node, no longer containing other any child nodes.
Simultaneously, it should be noted that, the title of the daughter element node of row node uses hereinbefore " field1 ", " field2 " etc. represent, but in fact their real name corresponds respectively to the row name of each row of the relation table of the result that relational database management system returns.If certain row fieldX of certain row of relation table is NULL, then represent this row node element not containing fieldX daughter element node; If return results certain row there is no title, so use the character string of this form of the fieldX of acquiescence as title.
Like this, even if what return is a value of atom, the rreturn value of the Data Update/deletion/update of such as SQL, the rreturn value of call stored procedure, and the rreturn value of query manipulation returning single value of atom, also can use above-mentioned form to represent.
When the type property value of a field fieldX is string/text/clob/varchar/char (n) (data type of this field is character string), all characters between <fieldX> and </fieldX> are all by the character as character string.
Wherein, in embodiments of the present invention, the method that the relation table of the result returned by relational database management system is converted to the XML document fragment of above-mentioned form be exactly according to this form describe relation table line by line word for word section change.Such as, the relation table shown in table 1:
Table 1
By built-in function, the results conversion that RDBMS returns by the described built-in function in the query engine kernel of XMLDBMS is XML document fragment, that is:
Subsequently, enter step S5: described XML document fragment is delivered to XML document resolver, described XML document fragment is split into XDM node element by described XML document resolver, and is stored in a transient node table by described XDM node element.Like this, above-mentioned Query Result is just converted into any one common xquery and inquires about the intermediate result produced.This intermediate result just can be calculated the net result of an XQuery/SQL mixing inquiry by the method for xquery query engine as using the intermediate result of any xquery subquery.
The result that XQuery subquery returns can be embedded in the SQL query of mixing inquiry, but, this result must be single project (item, single XDM node can atom turn to value of atom), cannot be multiple XDM projects (items).The mode embedded uses string-concatenation method exactly in SQL query character string, and other parts that XQuery subquery results transfers character string and SQL to are spliced into a complete inquiry string.
In sum, technical scheme of the present invention has following advantage:
Technical scheme of the present invention can allow data exchange between relational database management system and XML data base management system, and the data upgraded in management data base management system, the user being can be original under the prerequisite of relational database management system in reservation, introduce the data source of XML data base management system as new infosystem, remain while playing fresh information system value historical data and use value, maintain the interoperability of two kinds of operating systems simultaneously.
Should be understood that method and system as described herein can realize in hardware in a variety of manners, software, firmware, dedicated processor or their combination.Especially, the application program that a part at least of the present invention comprises programmed instruction preferably realizes.These programmed instruction are positively included in one or more program storage device and (are included but not limited to hard disk, magnetic floppy disc, RAM, ROM, CD, ROM etc.) inner, and can by any equipment or the machine that comprise appropriate configuration, such as a kind of universal digital computer with processor, internal memory and input/output interface performs.It should also be understood that the building block of some systems owing to describing in accompanying drawing and treatment step are preferably with software simulating, so the connection between system module (or logic flow of method step) may be different, and this depends on programming mode of the present invention.According to guidance given here, those of ordinary skill in the related art can design these and similar embodiment of the present invention.
Disclosed above many aspects of the present invention and embodiment, it will be understood by those skilled in the art that other side of the present invention and embodiment.Many aspects disclosed in the present invention and embodiment are just for illustrating, be not limitation of the invention, real protection domain of the present invention and spirit should be as the criterion with claims.

Claims (6)

1. the method for exchanges data between relational database management system and XML data base management system, is characterized in that, comprising:
Step S1 a: built-in function is set in described XML data base management system, described built-in function is for receiving two parameters: connection string and SQL query statement, wherein, described connection string comprises URL/IP+ port numbers, database name, user name, the encrypted message of relationship by objective (RBO) data base management system (DBMS);
Step S2: described XML data base management system and described relational database management system are connected by described connection string, and by described SQL query statement, the data query of XML data base management system and update request are sent in described relational database management system;
Step S3: request results is back to described XML data base management system by described relational database management system;
Step S4: described request results is converted into the XML document fragment having and preset set form by described XML data base management system by described built-in function;
Step S5: the XML document fragment described in parsing.
2. the method for exchanges data between relational database management system and XML data base management system as claimed in claim 1, it is characterized in that, in described step S3, request results is back to described XML data base management system with the form of relation table by described relational database management system.
3. the method for exchanges data between relational database management system and XML data base management system as claimed in claim 1, it is characterized in that, described step S5 is specially: described XML document fragment is delivered to XML document resolver, described XML document fragment is split into XDM node element by described XML document resolver, and is stored in a transient node table by described XDM node element.
4. the method for exchanges data between relational database management system and XML data base management system as claimed in claim 1, it is characterized in that, the described XML document fragment with set form is the XDM of the XML node element composition of some row by name, described row nodename is fixed, inside comprises some daughter element nodes, described row node corresponds to a line in relation table, and the daughter element node of described row node is corresponding to the row in the corresponding line in described relation table.
5. the method for exchanges data between relational database management system and XML data base management system as claimed in claim 4, it is characterized in that, described daughter element node has and only has the attribute of one " type " by name, and its property value is the data type of described relation table respective column.
6. the relational database management system as described in claim 4 or 5 and the method for exchanges data between XML data base management system, it is characterized in that, described daughter element node has and only has a text child node, and the title of described each daughter element node is corresponding with the row name that described relation table respectively arranges.
CN201210193861.7A 2012-06-12 2012-06-12 A kind of method of exchanges data between relational database management system and XML data base management system Expired - Fee Related CN102760164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210193861.7A CN102760164B (en) 2012-06-12 2012-06-12 A kind of method of exchanges data between relational database management system and XML data base management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210193861.7A CN102760164B (en) 2012-06-12 2012-06-12 A kind of method of exchanges data between relational database management system and XML data base management system

Publications (2)

Publication Number Publication Date
CN102760164A CN102760164A (en) 2012-10-31
CN102760164B true CN102760164B (en) 2016-01-20

Family

ID=47054621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210193861.7A Expired - Fee Related CN102760164B (en) 2012-06-12 2012-06-12 A kind of method of exchanges data between relational database management system and XML data base management system

Country Status (1)

Country Link
CN (1) CN102760164B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150293946A1 (en) * 2014-04-09 2015-10-15 City University Of Hong Kong Cross model datum access with semantic preservation for universal database
CN105630838B (en) * 2014-11-07 2019-03-26 北大方正集团有限公司 A kind of data replacement method and system
CN104657443A (en) * 2015-02-04 2015-05-27 国家电网公司 XML (extensive markup language) native database-based hybrid access method for power network data model
CN106557568B (en) * 2016-11-14 2019-05-21 中国电子科技集团公司第二十八研究所 The processing method of XML file format and the relational database conversion of pattern match
CN109962808B (en) * 2017-12-26 2022-03-04 北京世纪东方智汇科技股份有限公司 Data interaction processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004100021A3 (en) * 2003-05-01 2004-12-29 Oracle Int Corp Retaining hierarchical information in mapping between xml documents and relational data
CN1825306A (en) * 2005-10-31 2006-08-30 北京神舟航天软件技术有限公司 XML data storage and access method based on relational database
CN101719156A (en) * 2009-12-30 2010-06-02 南开大学 System of seamless integrated pure XML query engine in relational database

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100476810C (en) * 2005-05-08 2009-04-08 浙江大学 Method for implementing automatic exchange of information system data
CN102156699A (en) * 2010-02-11 2011-08-17 陈巍 Data migration method based on JDOM revolving technology
CN102411598B (en) * 2011-07-29 2013-07-31 株洲南车时代电气股份有限公司 Method and system for realizing data consistency

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004100021A3 (en) * 2003-05-01 2004-12-29 Oracle Int Corp Retaining hierarchical information in mapping between xml documents and relational data
CN1825306A (en) * 2005-10-31 2006-08-30 北京神舟航天软件技术有限公司 XML data storage and access method based on relational database
CN101719156A (en) * 2009-12-30 2010-06-02 南开大学 System of seamless integrated pure XML query engine in relational database

Also Published As

Publication number Publication date
CN102760164A (en) 2012-10-31

Similar Documents

Publication Publication Date Title
CN106934062B (en) Implementation method and system for querying elastic search
CN106227800B (en) Storage method and management system for highly-associated big data
US8356029B2 (en) Method and system for reconstruction of object model data in a relational database
US7882146B2 (en) XML schema collection objects and corresponding systems and methods
Bugiotti et al. Invisible glue: scalable self-tuning multi-stores
CN102819585B (en) Method for controlling document of extensive makeup language (XML) database
Vellucci Metadata and authority control
US8346812B2 (en) Indexing in a resource description framework environment
US20120066205A1 (en) Query Compilation Optimization System and Method
KR20060045622A (en) Extraction, transformation and loading designer module of a computerized financial system
CN102760164B (en) A kind of method of exchanges data between relational database management system and XML data base management system
US20150278300A1 (en) Query translation for searching complex structures of objects
CN108959538A (en) Text retrieval system and method
CN102346744A (en) Device for processing materialized table in multi-tenancy (MT) application system
CN105975489A (en) Metadata-based online SQL code completion method
US9116932B2 (en) System and method of querying data
CN101216851A (en) Ontology data administrative system and method
Fuentes‐Lorenzo et al. A RESTful and semantic framework for data integration
CN102147794A (en) Multi-database caption display method and device based on SQL (structured query language) sentence
Bardi et al. Coping with interoperability and sustainability in cultural heritage aggregative data infrastructures
Makris et al. Federating natural history museums in natural Europe
US20060143167A1 (en) System and method for providing access to data with user defined table functions
Morishima et al. A data modeling and query processing scheme for integration of structured document repositories and relational databases
Zepeda et al. A model driven approach for data warehouse conceptual design
Liu et al. Storing and querying fuzzy XML data in relational databases

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) C

Effective date: 20130106

Owner name: BEIDA FANGZHENG GROUP CO. LTD.

Free format text: FORMER OWNER: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO., LTD.

Effective date: 20130106

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 201203 PUDONG NEW AREA, SHANGHAI TO: 100871 HAIDIAN, BEIJING

TA01 Transfer of patent application right

Effective date of registration: 20130106

Address after: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant after: Peking Founder Group Co., Ltd.

Applicant after: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

Address before: 201203, No. 608, midsummer Road, Zhangjiang hi tech park, Shanghai, Pudong New Area

Applicant before: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: FOUNDER INFORMATION INDUSTRY HOLDING CO., LTD. FOU

Free format text: FORMER OWNER: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO., LTD.

Effective date: 20130912

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20130912

Address after: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant after: Peking Founder Group Co., Ltd.

Applicant after: Founder Holdings Company Limited (Founder Holdings)

Applicant after: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

Address before: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant before: Peking Founder Group Co., Ltd.

Applicant before: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160120

Termination date: 20170612

CF01 Termination of patent right due to non-payment of annual fee