Font Size: a A A

The Research And Implementation Of The Middleware Between XML And RDBMS Based On Zhang Encode

Posted on:2009-09-06Degree:MasterType:Thesis
Country:ChinaCandidate:B ZhangFull Text:PDF
GTID:2178360245953595Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
With the unceasingly increase of XML data exchanging amount among web applications, how to store XML documents and exchange data reliably and efficiently between XML and database is becoming more and more important. Index,storage and query of relational database can be used if we store XML document into relational database. But many complicated problems appear in the process of storage because of the unmatching between the complicated hierarchical structure of XML document and the flat structure of relational database.Beginning from the background applied above, this paper analyzes the advantages and disadvantages of related technology and instrument of XML document storage abroad and domestic at present, studies the related theory and technology. At first, this paper addresses how to store XML documents into RDBMS by using region encode. This method is one kind of model mapping methods, which stores XML documents using uniform relational schema. Based on this storage method, this paper designs an algorithm which implements the transformation from XPath query to SQL query. The process of transformation can be divided into three steps: First, construct XPath query graph from XPath expression. Secondly, according to the locating steps split query graph into several sub-graphs. By using calculation method of XPath query axis based on Zhang encode method, we can get Zhang encoding sets which are related to testing nodes in locating steps. These nodes are represented by sub-query graphs. Thirdly, by calculation method again we generate SQL according to Zhang encoding which are generated from former step. On the other hand, this paper addresses an algorithm of publishing relational data to XML format. This algorithm not only can convert relational data into XML document which is stored in RDBMS, but also can let user get XML format query result after submit XPath expressions.The whole system is designed into three modules, which are data storage module, query transformation module and data format transformation module. During the implementation, the system is divided into data access layer, business logic layer and user interface layer. Experiments show that storing XML document into RDBMS by using model mapping method can avoid limitations of structure mapping method. This kind of method takes advantage of the power of data management in RDBMS, implements efficient storage of storing XML document in relational schema.
Keywords/Search Tags:Region encode, Zhang encode, XPath Query Graph, RDBMS, Model Mapping
PDF Full Text Request
Related items