节点文献

XQuery Java API的设计与实现

【作者】 刘政怡

【导师】 谢荣传;

【作者基本信息】 安徽大学 , 计算机应用, 2004, 硕士

【摘要】 XQuery Java API是一种用来从XQuery查询中执行和提取结果的Java API。用户可以准备XQuery查询、绑定XQuery查询字符串、执行XQuery查询,类似JDBC API,它也提供了XQueryResultSet类,用来获得执行XQuery查询结果的XML文档信息。XQuery Java API的核心是已经实现的XQuery编译器,它具有一些局限性:只能查询有Schema类型说明的XML文档,而在现实世界中,并非所有XML文档都有类型说明,所以,我们对XQuery编译器进行扩展,使得它对没有类型说明的XML文档也可以进行查询;同样,为使查询更具有通用性,增加网络查询功能,实现对以URL地址表示的XML文档的查询;另外,不可能事先构造所有文档的数据模型,所以对XQuery查询实现的基础——数据模型应采取动态构造的方法:当需要查询某文档时才构造它。 XQuery Java API还可以屏蔽数据源的异构性,提供给用户一个使用多种数据源的统一接口,只要用户提供满足查询要求的XQuery查询字符串,就可以使用该接口达到查询目的。XQuery语言本身并不能实现该功能,所以我们对它进行扩展,增加嵌套SQL语句的sqlquery表达式,使用JDBC来查询SQL语句,而将产生的结果转换为XML文档,再使用XQuery编译器来实现查询要求,达到集成关系数据库的目的。 另外,我们还提出并实现了XQuery视图机制,仿照关系数据库的视图,由查询来定义其内容,使得不同用户对XML文档具有不同的查看能力,保证查询安全、可靠。 在本文的最后,我们还给出使用XQuery Java API查询XML文档和关系数据库的实例,并针对存在的一些问题,提出今后进一步的工作。

【Abstract】 XQuery Java API is a Java API which can execute query and get results from query. Users can first prepare XQuery search, then kidnap XQuery search strings, and then execute it, last, it can get results of XML files by XQueryResultSet class like JDBC API. Its core is XQuery’s Compiler which has some deficiencies. It can only query XML files which have schema. But in real life not all the XML files have schema, so we extend its function so that it can query no Schema XML files; furthermore, we add network function that can query URL files on the web; last, because it is impossible to construct data models of all the XML files, we adopt dymanic construction.XQuery Java API can also shied heterogenous data sources and supply users with a unified interface which can query a number of data sources. Users can achieve query aims by writing XQuery search strings. XQuery itself does not implement such function. So we extent its function by adding sqlquery expressions which contain SQL. It gets results from queries by JDBC API and convert it into XML format. Then it uses XQuery complier to query in succession in order to integrate related databases.Furthmore, we supply users with XQuery view t o query XML files safely and reliably from different views. It defines its contents with query like views of the related databases.At the end of this paper, we will give some examples of querying XML files and related databases. And according to some existing problems further works and developments will also be given.

【关键词】 XMLXQuery异构接口关系数据库视图
【Key words】 XMLXQueryheterogenousinterfacerelated databaseview
  • 【网络出版投稿人】 安徽大学
  • 【网络出版年期】2004年 03期
  • 【分类号】TP311.1
  • 【下载频次】153
节点文献中: 

本文链接的文献网络图示:

本文的引文网络