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}。