We present a case study in applied category theory written from the point of view of an applied domain: the formalization of the widely-used property graphs data model in an enterprise setting using elementary constructions from type theory and category theory, including limit and co-limit sketches. Observing that algebraic data types are a common foundation of most of the enterprise schema languages we deal with in practice, for graph data or otherwise, we introduce a type theory for algebraic property graphs wherein the types denote both algebraic data types in the sense of functional programming and join-union E/R diagrams in the sense of database theory. We also provide theoretical foundations for graph transformation along schema mappings with by-construction guarantees of semantic consistency. Our data model originated as a formalization of a data integration toolkit developed at Uber which carries data and schemas along composable mappings between data interchange languages such as Apache Avro, Apache Thrift, and Protocol Buffers, and graph languages including RDF with OWL or SHACL-based schemas.
翻译:我们从应用领域的角度对应用类别理论进行了案例研究:利用类型理论和类别理论的基本构思,包括限值和共同界限草图,将广泛使用的属性图表数据模型正式化;注意到代数数据类型是我们实际处理的大多数企业化学系语言的共同基础,用于图表数据或其他方面,我们为代数属性图引入了一种类型理论,其中两种类型都表示功能编程和合并E/R图意义上的数据库理论意义上的代数数据类型;我们还提供了理论基础,用于在Schema图绘制图时进行图解转换,并保障语义一致性;我们的数据模型起源于在Uber开发的数据整合工具包的正规化,该工具将数据和化学与数据交换语言(如Apache Avro, Apache Thrift, 和Protol Buffers,以及包括有OWL或SHACL-Schemas的数据交换语言的图表语言)之间的可比较绘图。