首页 | 本学科首页   官方微博 | 高级检索  
     检索      

从关系数据库到扩展置标语言文档的数据映射方法研究
引用本文:丁峰,沈钧毅,赵天海.从关系数据库到扩展置标语言文档的数据映射方法研究[J].西安交通大学学报,2002,36(10):1066-1069,1074.
作者姓名:丁峰  沈钧毅  赵天海
作者单位:西安交通大学电子与信息工程学院,710049,西安
基金项目:国家自然科学基金资助项目 (60 1 730 58) .
摘    要:为了将关系数据以扩展置标语言(XML)数据的形式发布,分别提出了将关系模式映射为文件类型定义(DTD)和扩展置标语言方案(XMLSchema)的两种规则;非空表元素规则和空表元素规则,前者将关系模式中的表,记录和字段分别映射为表元素,表元素中的记录元素和记录元素中的字段子元素,后者将表映射为表元素,记录映射为表元素算法,前者借助一个链队列和两个栈分别存放解析得到的各级元素的开始,结束标记和属性,后者借助一个链队列存放解析得到的元素标记和属性,它们均可实现将关系数据写入XML文档,最后对实验结果进行了分析,得出在表数目相同,表中字段数也相同的情况下,表元素非空算法略优于空表元素算法的结论。

关 键 词:扩展置标语言  关系数据库  数据模式  文档类型定义  转换规则  数据映射
文章编号:0253-987X(2002)10-1066-04

Research and Implementation of Mapping Relational Database to Extensible Markup Language Document
Ding Feng,Shen Junyi,Zhao Tianhai.Research and Implementation of Mapping Relational Database to Extensible Markup Language Document[J].Journal of Xi'an Jiaotong University,2002,36(10):1066-1069,1074.
Authors:Ding Feng  Shen Junyi  Zhao Tianhai
Abstract:Two rules of mapping relational schema to DTD (document type definition) and extensible markup language (XML) schema are provided for transferring data from relational database to XML data. They are the rule of non null able table elements and the rule of null table elements. The former maps tables, records and fields to table elements, record sub elements in table elements and field sub elements in record elements. The latter maps tables to table elements without sub elements, and records to attributes of table elements. Two algorithms of converting relational data to XML documents corresponding to the rules are designed and implemented, which named algorithms of not nullable table elements (ANNTE) and nullable table elements (ANTE). ANNTE stores element marks and attributes in one linked queue and two stacks, and ANTE stores marks and attributes in one linked queue together. Both of them can convert data from relational database into XML document. The results of experiments indicate that when there are the same number of tables and fields in databases, ANTE is better than ANNTE, but if the number is small, they are similar to.
Keywords:XML  relational database  data schema  DTD
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号