节点文献
原生型扩展标记语言数据库查询及优化研究
Study of the Native XML Database Query and Optimization
【作者】 王玮;
【导师】 吴涛;
【作者基本信息】 华中科技大学 , 软件工程, 2004, 硕士
【摘要】 XML(eXtensible Markup Language)作为数据交换的标准, 更着重于统一数据格式, 而不是提供数据库的特性。 因此在 XML应用中, 数据库作为数据管理的位置依然没有改变。 IBM 公司, Microsoft 和 Oracle 等传统数据库厂商, 现在也在踏入 NXD (Native XML Database) 的领域。 XQuery 语言是 W3C 推荐的最新的XML 查询语言 ,它继承了以往各种 XML 或半结构化查询语言的优点。 在 NXD中实现 XQuery ,并对其进行查询优化, 在整个 NXD 研究中有着重要的意义。 系统在 XQuery 实现上, 将其分为: 词法分析, 语法分析, XQuery 规范化和查询计算求值等部分。 词法分析时区分了各种不同的状态, 分析时记住当前的上下文状态, 根据不同的上下文状态选择不同的词法分析函数。 解决了词法分析中需要单独分析不同的词在不同的上下文环境下的语义这个最重要的问题。 语法分析根据词法分析器提供的语法单元构造查询的语法树 。在语法分析时, 对 XQuery中外部函数(用户定义函数)和内部函数采用不同的处理方法, 避免了外部函数由于存在递归和引用时还未定义等问题。 对语法分析后的语法树, 用类似中间代码进行规范化, 便于机器识别和移植。 在 NXD 的查询优化中, 受到传统关系数据库的查询优化技术的启发, 并根据XML数据的半结构化特征, 系统将 XML结构信息和信息集内容分离, 分别在 XML路径信息逻辑结构和信息集内容物理存储上进行优化。 对于 XML 的结构路径信息, 即结点在 XML文档中的位置及其与其它结点的关系选取扩展编码方式对结点结构信息进行量化, 然后在此基础上采用 POEM(Path Oriented Extensible Model)模型, 选择最优的 XML 路径, 提高查询效率; XML 结点及其内容以结点集合的形式独立存储, 对节点的内容和其存储可以通过采用批量插入的 B+树索引的方式进行优化。
【Abstract】 Extensible Markup Language (XML), which is as a criterion of data exchanging,emphasizes on the uniform data format but not provides the database features. So in theapplication of XML, DBMS is still the main mean of data management. Sometraditional database vendors such as IBM, Microsoft and Oracle step into Native XMLDatabase (NXD) field recently. XQuery is the latest XML query languagerecommended by W3C. It borrows advantages from many XML query languages orsemi-structure languages. Implementing XQuery in NXD and query optimization arevery important in the study of NXD. The XQuery implemention in our system mainly divides into such parts: lexicanalysis, semantic analysis, XQuery normalization and query computation etc. It candistinguish different status and memorize the present context while analyzing andchoose different lexic analysis function according to different context state. It also cansolve the important problem of lexic analysis that we need analyze different lexis indifferent contexts. Lexic analysis constructs query semantic tree according to thesemantic unit which lexic analyzer provides. In semantic analysis, it deals with externalfunction (user-defined function) and internal function differently. That can avoid theproblems there are recursions in the external function and external function is still notdefined when it being referenced. It normalizes the query tree which has processedlexic analysis. The normalization uses Intermediate Language to facilitate machinereplant and migrate. Inspired by the traditional RDBMS query optimization technology, we separatethe XML document into structure and content, meanwhile we optimize themindividually according to the XML language’s semi-structure feature. Extendingnumbering is taken to quantitate the nodes which present XML path information. Wetake Path Oriented Extensible Model POEM model on the basis of the numberingmechanism to choose the most optimum path in order to improve query effeciency.XML nodes and contents are stored separately as node sets. The node’s content andstore can be optimized through the extending B+_tree index.
【Key words】 eXtensibleMarkupLanguage; NativeDatabase; XQuery; QueryOptimization;
- 【网络出版投稿人】 华中科技大学 【网络出版年期】2005年 02期
- 【分类号】TP311.13
- 【被引频次】4
- 【下载频次】121