An Approach to Converting Relational Database to Graph Database: from MySQL to Neo4j

Hui Feng, Meigen Huang
{"title":"An Approach to Converting Relational Database to Graph Database: from MySQL to Neo4j","authors":"Hui Feng, Meigen Huang","doi":"10.1109/ICPECA53709.2022.9719151","DOIUrl":null,"url":null,"abstract":"At present, there are few research methods that can convert any relational database into a graph database, and most of them are based on a specific field data set to build a relational database, and then perform simple conversion through the characteristics of the data set.Aiming at this problem, a universal conversion method is proposed. Firstly, converted the most basic component tables name, records, and fields in the relational database into labels, nodes, and corresponding attributes of the nodes under the graph database; secondly, used the intermediate connection table method to convert the foreign keys in the relational database into the relationship of a graph database between the nodes; then some constraint issues in relational databases, such as multiple primary key issues, indexes, and no default values, were optimized to form a final graph database model that met expectations; finally, Realized the effective migration of large quantities of data in the relational database to the constructed graph database model. In the experiment, the above method was used to successfully convert a relational database to a graph database, and the database construction, data import, SQL query and Cypher language query were performed for the database before and after the conversion, and through the analysis and comparison of data integrity, time cost, result validity,which shows that the integrity and operability of the database before and after conversion are consistent, and the data processing efficiency of the database is much higher than that of the relational database, which verifies that the method in this paper is feasible.","PeriodicalId":244448,"journal":{"name":"2022 IEEE 2nd International Conference on Power, Electronics and Computer Applications (ICPECA)","volume":"130 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-01-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE 2nd International Conference on Power, Electronics and Computer Applications (ICPECA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICPECA53709.2022.9719151","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

At present, there are few research methods that can convert any relational database into a graph database, and most of them are based on a specific field data set to build a relational database, and then perform simple conversion through the characteristics of the data set.Aiming at this problem, a universal conversion method is proposed. Firstly, converted the most basic component tables name, records, and fields in the relational database into labels, nodes, and corresponding attributes of the nodes under the graph database; secondly, used the intermediate connection table method to convert the foreign keys in the relational database into the relationship of a graph database between the nodes; then some constraint issues in relational databases, such as multiple primary key issues, indexes, and no default values, were optimized to form a final graph database model that met expectations; finally, Realized the effective migration of large quantities of data in the relational database to the constructed graph database model. In the experiment, the above method was used to successfully convert a relational database to a graph database, and the database construction, data import, SQL query and Cypher language query were performed for the database before and after the conversion, and through the analysis and comparison of data integrity, time cost, result validity,which shows that the integrity and operability of the database before and after conversion are consistent, and the data processing efficiency of the database is much higher than that of the relational database, which verifies that the method in this paper is feasible.
关系数据库到图形数据库的转换方法:从MySQL到Neo4j
目前,能够将任意关系数据库转换为图数据库的研究方法很少,大多是基于特定的字段数据集构建关系数据库,然后通过数据集的特征进行简单的转换。针对这一问题,提出了一种通用的转换方法。首先,将关系数据库中最基本的组件表名、记录和字段转换为图数据库下节点的标签、节点和相应属性;其次,采用中间连接表的方法将关系数据库中的外键转换为图数据库节点间的关系;然后对关系数据库中的约束问题,如多主键问题、索引问题、无默认值等进行了优化,最终形成了符合预期的图数据库模型;最后,实现了关系数据库中大量数据向所构建的图数据库模型的有效迁移。在实验中,利用上述方法成功地将一个关系型数据库转换为图形数据库,并对转换前后的数据库进行了数据库构建、数据导入、SQL查询和Cypher语言查询,并通过对数据完整性、时间成本、结果有效性的分析和比较,表明转换前后数据库的完整性和可操作性是一致的。并且该数据库的数据处理效率远高于关系型数据库,验证了本文方法的可行性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信