谷歌浏览器插件
订阅小程序
在清言上使用

Enabling schema-independent data retrieval queries in MongoDB

INFORMATION SYSTEMS(2023)

引用 0|浏览16
暂无评分
摘要
NoSQL databases are designed to allow data to be stored without a fixed schema. In this scenario, writing data access code (queries and associated code) is challenging for two main reasons: (i) the query developer needs to know all details regarding the logical/physical schema; (ii) whenever the schema needs to change, all queries need to be rewritten. The literature presents some solutions to mitigate these challenges by making queries independent from the schema, but they are either restricted to simple queries or depend on a prescribed schema. In this paper, we propose a solution based on conceptual data modeling and code generation to enable the writing of complex data retrieval queries in a document-oriented database, independent from the logical/physical schema. We created a language for a classic ER algebra, with a concrete syntax and generative operational semantics targeting MongoDB. Based on the ideas of model management, the generative semantics uses a model that establishes the mapping between entities, relationships and document collections. From a single ER-based data retrieval query, native query code is automatically generated for any logical/physical schema. Additionally, the resulting data structure produced by the generated code is always the same. Tests show that our implementation produces consistent results. Also, we show that our solution is able to obtain up to 500% gains in throughput and response time by simply changing the schema, without modifying the queries. Our solution requires a little extra effort from the database designer, to create the mapping, but makes the job of the query developer easier. It also results in more flexibility. Whenever the schema changes, only the mapping needs to be updated, not the queries.(c) 2023 Elsevier Ltd. All rights reserved.
更多
查看译文
关键词
NoSQL databases,Model management,Code generation,Query rewriting,Entity -Relationship algebra
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要