This paper introduces sketch-oriented databases, a categorical framework that encodes database paradigms as finite-limit sketches and individual databases and schemas as set-valued models. It illustrates the formalism through graph-oriented paradigms such as quivers, RDF triplestores and property graphs. It also shows how common graph features such as labels, attributes, typing, and paths, are uniformly captured by sketch constructions. Because paths play an important role in queries, we propose inference rules formalized via localizers to compute useful paths lazily; such localizers are also useful for tasks like database type conformance. Finally, the paper introduces stuttering sketches, whose aim is to facilitate modular composition and scalable model growth: stuttering sketches are finite-limit sketches in which relations are specified by a single limit instead of two nested limits, and the paper proves that finite unions of models of a stuttering sketch are pointwise colimits.
翻译:本文介绍面向草图的数据库,这是一种范畴化框架,它将数据库范式编码为有限极限草图,将单个数据库和模式编码为集合值模型。该形式化方法通过面向图的范式(如有向多重图、RDF三元组存储和属性图)进行阐释。本文还展示了如何通过草图构造统一捕获常见的图特征,如标签、属性、类型和路径。由于路径在查询中具有重要作用,我们提出通过局部化子形式化的推理规则来惰性计算有用路径;此类局部化子对于数据库类型一致性等任务同样有效。最后,本文引入结巴草图,其目标是促进模块化组合和可扩展的模型增长:结巴草图是一种有限极限草图,其中关系由单个极限而非两个嵌套极限指定,并证明了结巴草图模型的有限并集是逐点余极限。