Although a few approaches are proposed to convert relational databases to graphs, there is a genuine lack of systematic evaluation across a wider spectrum of databases. Recognising the important issue of query mapping, this paper proposes an approach Rel2Graph, an automatic knowledge graph construction (KGC) approach from an arbitrary number of relational databases. Our approach also supports the mapping of conjunctive SQL queries into pattern-based NoSQL queries. We evaluate our proposed approach on two widely used relational database-oriented datasets: Spider and KaggleDBQA benchmarks for semantic parsing. We employ the execution accuracy (EA) metric to quantify the proportion of results by executing the NoSQL queries on the property knowledge graph we construct that aligns with the results of SQL queries performed on relational databases. Consequently, the counterpart property knowledge graph of benchmarks with high accuracy and integrity can be ensured. The code and data will be publicly available. The code and data are available at github\footnote{https://github.com/nlp-tlp/Rel2Graph}.
翻译:尽管已有少量方法将关系数据库转换为图结构,但针对更广泛数据库的系统性评估仍存在明显缺失。针对查询映射这一重要问题,本文提出Rel2Graph方法——一种可从任意数量关系数据库自动构建知识图谱(KGC)的方法。该方法同时支持将合取SQL查询映射为基于模式的NoSQL查询。我们在两个广泛使用的关系数据库语义解析基准数据集Spider和KaggleDBQA上对方法进行评估,采用执行准确率(EA)指标,通过执行在构建属性知识图谱上运行的NoSQL查询结果与关系数据库SQL查询结果的一致性量化准确率占比。由此可确保基准测试对应的属性知识图谱兼具高准确度与完整性。相关代码与数据将公开发布于github\footnote{https://github.com/nlp-tlp/Rel2Graph}。