期刊文献+

从关系数据库到扩展置标语言文档的数据映射方法研究

Research and Implementation of Mapping Relational Database to Extensible Markup Language Document
下载PDF
导出
摘要 为了将关系数据以扩展置标语言 (XML)数据的形式发布 ,分别提出了将关系模式映射为文件类型定义 (DTD)和扩展置标语言方案 (XMLSchema)的两种规则 :非空表元素规则和空表元素规则 .前者将关系模式中的表、记录和字段分别映射为表元素、表元素中的记录元素和记录元素中的字段子元素 ;后者将表映射为表元素 ,记录映射为表元素的属性 ,表元素中无子元素 .针对这两种规则分别设计并实现了表元素非空算法和空表元素算法 ,前者借助一个链队列和两个栈分别存放解析得到的各级元素的开始、结束标记和属性 ,后者借助一个链队列存放解析得到的元素标记和属性 ,它们均可实现将关系数据写入XML文档 .最后对实验结果进行了分析 ,得出在表数目相同、表中字段数也相同的情况下 ,表元素非空算法略优于空表元素算法的结论 . 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.
出处 《西安交通大学学报》 EI CAS CSCD 北大核心 2002年第10期1066-1069,1074,共5页 Journal of Xi'an Jiaotong University
基金 国家自然科学基金资助项目 (60 1 730 58) .
  • 相关文献

参考文献7

  • 1Williams K.XML structures for existing databases[R/OL].http://www-106.ibm.com/developerworks/library/x-struct/.2001-01-02.
  • 2Shanmugasundaram J,Shekita E,Barr R,et al.Efficiently publishing relational data as XML documents [J].VLDB Journal,2000,10(2/3):65~76.
  • 3W3C.Extensible markup language(XML) 1.0 (second edition )[S/OL].http://www.w3.org/TR/2000/REC-xml-20001006.2000-10-06.
  • 4W3C.Extensible markup language(XML) 1.0 (second edition )[S/OL].http://www.w3.org/TR/2001/REC-xmlschema-0-200105021.2001-05-02.
  • 5W3C. Extensible markup language(XML) 1.0 (second edition )[S/OL].http://www.w3.org/TR/2001/REC-xmlschema-1-200105021.2001-05-02.
  • 6W3C. Extensible markup language(XML) 1.0 (second edition )[S/OL].http://www.w3.org/TR/2001/REC-xmlschema-2-200105021.2001-05-02.
  • 7丁峰,王煜,沈钧毅,齐勇.一种扩展置标语言解析器的设计与实现[J].西安交通大学学报,2002,36(8):867-870. 被引量:4

二级参考文献5

  • 1[1]W3C. Extensible markup language(XML) 1.0 [S/OL]. http:∥www.w3.org/TR/2000/REC-xml-20001006, 2000-10-06.
  • 2[2]W3C. Document object model (DOM) level 1 specification [S/OL]. http:∥www.w3.org/TR/1998/REC-DOM-Level-1-19981001, 1998-10-01.
  • 3[3]W3C.Document object model (DOM) level 2 core specification [S/OL]. http:∥www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113, 2000-11-13.
  • 4[4]Megginson D. SAX 2.0: the simple API for XML [S/OL]. http:∥www.megginson.com/SAX/, 2000-05-02.
  • 5[5]Megginson D. SAX 2.0: the simple API for XML [S/OL]. http:∥www.megginson.com/SAX2/,2000-05-02.

共引文献3

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部