首页    期刊浏览 2024年12月04日 星期三
登录注册

文章基本信息

  • 标题:A solution for synchronous incremental maintenance of materialized views based on SQL recursive query
  • 本地全文:下载
  • 作者:Nguyen Tran Quoc Vinh ; Dang Thanh Hao ; Pham Duong Thu Hang
  • 期刊名称:Eastern-European Journal of Enterprise Technologies
  • 印刷版ISSN:1729-3774
  • 电子版ISSN:1729-4061
  • 出版年度:2019
  • 卷号:5
  • 期号:2
  • 页码:6-17
  • DOI:10.15587/1729-4061.2019.180226
  • 语种:English
  • 出版社:PC Technology Center
  • 摘要:Materialized views are excessively stored query execution results in the database. They can be used to partially or completely answer queries which will be further appeared instead of re-executing query from the scratch. There is a large number of published works that address the maintenance, especially incremental update, of materialized views and query rewriting for using those ones. Some of them support materialized views based on recursive query in datalog language. Although most of datalog queries can be transferred into SQL queries and vise versa but it is not the case for recursive queries. Recursive queries in the data log try to find all possible transitive closures. Recursive queries in SQL (Common Table Expression – CTE) return direct links but not transitive closures. In this paper, we propose efficient methods for incremental update of materialized views based on CTE; and then propose an algorithm for generating source codes in C language for any input SQL recursive queries. The synthesized source codes implement our proposed incremental update algorithms according to inserted/deleted/updated record set in the base tables. This paper focuses mainly on the recursive queries whose execution results are directed tree-structured data. The two cases of tree node are considered. In the first case, a child node has only one parent node and in the second case, a child node can have many parent nodes. Those two cases represent the two types of relationships between entities in real world, that are one–to–many and many–to–many, respectively. For the one–to–many relationships, the relationship data is accompanied with the records describing the child using some fields. Those fields are set as null in deleting a concrete relationship. For the many–to–many relationships, it is stored in a separate table and the concrete relationships are removed by deleting describing records from that table. Considering of enforcing referential integrity may help to reduce the searching space and therefore, help to improve the performance. However, the set of tree nodes or tree edges can be manipulated. All those combinations lead to different algorithms. The experimental results are provided and discussed to confirm the effectiveness of our proposed methods.
  • 关键词:materialized view;SQL recursive query;CTE;incremental update;source code generating
国家哲学社会科学文献中心版权所有