Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2007, Vol. 33 ›› Issue (16): 41-43. doi: 10.3969/j.issn.1000-3428.2007.16.014

• Software Technology and Database • Previous Articles     Next Articles

Translation Algorithm of XML and SQL Query Based on DTD

BU Li, LI Jun-huai, ZHANG Jing   

  1. (School of Computer Science and Engineering, Xi’an University of Technology, Xi’an 710048)
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-08-20 Published:2007-08-20

基于DTD的XML与SQL查询转换算法

卜 莉,李军怀,张 璟   

  1. (西安理工大学计算机科学与工程学院,西安 710048)

Abstract: In order to translate XML queries to SQL queries, this paper proposes a translation framework and algorithm from XSLT queries to SQL queries. It studies how to map DTD to relation schema and its reverse. The key is the process and algorithm of translating XSLT queries to SQL queries which is based on XML DTD and without any intermediate language. The algorithm extracts statement set from XSLT program, and then merges and simplifies XPath in statement. After splitting XPath, each part of SQL statement is extracted. And the algorithm has high generality.

Key words: DTD, XSLT, schema mapping, SQL, query translation

摘要: 针对如何将XML查询转换成SQL查询提出了一个XSLT查询到SQL查询的转换框架和算法,研究了文档类型定义(DTD)和关系模式的相互映射方法及基于XML DTD且不使用任何中间语言将XSLT查询转换为SQL查询的具体过程和算法:从XSLT代码中抽取指令集合,合并、简化并分割其中的XPath,最后抽取出SQL语句的各个组成部分。该算法具有较高的通用性。

关键词: 文档类型定义, XSL转换, 模式映射, SQL, 查询转换

CLC Number: