Multi-model databases are designed to store, manage, and query data in various models, such as relational, hierarchical, and graph data, simultaneously. In this paper, we provide a theoretical basis for querying categorical databases. We propose two formal query languages: categorical calculus and categorical algebra, by extending relational calculus and relational algebra respectively. We demonstrate the equivalence between these two languages of queries. We propose a series of transformation rules of categorical algebra to facilitate query optimization. Finally, we analyze the expressive power and computation complexity for the proposed query languages.
翻译:多模型数据库旨在同时存储、管理和查询多种模型的数据,例如关系型、层次型和图数据。本文为范畴数据库的查询提供了理论基础。我们通过分别扩展关系演算和关系代数,提出了两种形式化查询语言:范畴演算与范畴代数。我们证明了这两种查询语言的等价性。我们提出了一系列范畴代数的转换规则以促进查询优化。最后,我们分析了所提出查询语言的表达能力和计算复杂度。