摘要
由于关系型数据库和图数据库存储模式的天然差别,将关系型数据库中的数据转存到图数据库的过程中,需解决对于关系的定义、节点唯一性以及保留原数据库约束信息的主要问题。针对上述问题,提出了一种关系型数据库向图数据库转换的方法。首先通过自定义或使用已有主键,并结合数据库表名的唯一性,解决了节点唯一性的问题;通过不同的配置方案,最大化保留了原关系型数据库的约束信息;然后提出了基于配置与中间表的边定义方法(Edge Definition Method based on Configuration and Intermediate Table,EDCIT),针对多种类型的数据库提供不同关系的映射方案,解决了转换过程中对于关系的定义。最终,通过对多个数据集进行实验,并使用Gremlin语句对转换后的数据进行测试,验证了转换后的数据具有完整性和可靠性。
Due to the differences between the storage mode of relational database and graph database,during the process of transforming data in relational database to graph database,it is necessary to solve the main problems of edge definition,vertex uniqueness and retention of original database constraint information.To solve the above problems,a method of transforming relational database to graph database is proposed.Firstly,by customizing the existing primary key,combined with the uniqueness of the table name,the problem of ensuring the uniqueness of the vertex is solved;through different configuration schemes,the constraint information of the original relational database can be maximized.Then,the edge definition method based on configuration and intermediate table(EDCIT)method is proposed,it provides different edge mapping solutions for multiple types of databases and solves the definition of edges during the transformation.Finally,through experiments on multiple data sets,and using Gremlin statement to test the transformed data,it verifies the integrity and reliability of the transformed data.
作者
鄂海红
韩鹏昊
宋美娜
E Hai-hong;HAN Peng-hao;SONG Mei-na(School of Computer Science(National Pilot Software Engineering School),Beijing University of Posts and Telecommunications,Beijing 100876,China)
出处
《计算机科学》
CSCD
北大核心
2021年第10期140-144,共5页
Computer Science
基金
国家重点研发计划课题(2018YFB1403501)。