摘要
随着XML文档大量涌现,如何有效地管理和查询XML数据已经成为亟待解决的问题。结合数据库发展的需要,研究了在关系数据库中利用物化视图和查询重写技术存储和查询XML文档。基于视图的查询重写技术是查询优化的一个重要技术,利用缓存的视图结果回答新查询不需要访问源数据库进行查询,能够节省查询处理时间。通过对物化视图、视图缓存、查询重写等技术进行研究,讨论如何利用关系数据库中缓存的物化视图来回答查询的问题,并实现了基于物化视图的XML数据查询系统原型。系统中使用扩展的模式匹配算法实现对多分支路径的模式匹配,解决了重写是否存在的问题,并通过模式匹配算法的匹配结果,来判断是否可以构造补偿表达式。通过构造补偿表达式算法得到重写结果,进而通过数据库中缓存的视图完成查询。
With the emergence of mass XML documents,how to effectively manage and query XML data has become a problem which should be solved immediately.To store and query XML documents in relational database by the materialized view and query rewriting technologies is studied in combination with the needs of database development.The technology of query rewriting based on Materialized View is an important technology in query optimization field.To answer a new query by using cache view result without accessing to any source database can save time of the query processing.Based on the research of materialized view,view cache and query rewriting technologies,how to use the materialized view which is cached in relational database to answer query is discussed.A prototype of XML data query system based on materialized view was achieved.The extended pattern matching algorithm is adopted in the system to realize the pattern matching of multi-branch route and make sure if the rewiting is existing.The matching result gotten by pattern matching algorithm is used to determine whether the compensation expression can be constructed.The results of rewriting can be obtained through the algorithm of constructing the compensation expression.The query is completed through views cached in the database.
出处
《现代电子技术》
2012年第16期24-26,共3页
Modern Electronics Technique
基金
西安工业大学北方信息工程学院院长科研基金(BXXJJ-1111)