A model conversion and data migration method from neo4j to relational database

A model conversion and database technology, applied in database models, relational databases, database design/maintenance, etc., can solve problems such as difficulty in operation, inability to achieve optimal performance, lack of visual display, etc., and achieve accurate and easy-to-operate data migration. Effect

Active Publication Date: 2019-05-03
TSINGHUA UNIV +1
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] One of the purposes of the present invention is to provide a model conversion and data migration method from Neo4j to relational database, so as to solve the problem that existing data migration methods cannot achieve optimal performance, lack of visual presentation, data migration is prone to errors, and is not easy to operate The problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A model conversion and data migration method from neo4j to relational database
  • A model conversion and data migration method from neo4j to relational database
  • A model conversion and data migration method from neo4j to relational database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0079] Here is an example to illustrate the method for extracting the conceptual model of Neo4j in the above step S1:

[0080] Such as Figure 4 As shown, there are three nodes in the graph, namely Sally, John, and NW. The labels of Sally and John are Person, and the label of NW is Book. There are 3 relationships in the example, among which there is a Friend_Of relationship between Person and a Has_Read relationship between Person and Book. Both nodes and relationships contain some properties. It can be seen that each node is equivalent to a record in a relational database, and each label is equivalent to a table in a relational database. Although each node may have many kinds of associated relationships, they can be classified according to the label of the node.

[0081] Step a: First call the Neo4j API to get all the tags in Neo4j, namely Person and Book.

[0082] Step b: For the Person tag, traverse the two nodes Sally and John, and then traverse all attributes of Sally ...

Embodiment 2

[0089] Here is an example to illustrate the model conversion method from Neo4j to a relational database. The specific method is as follows:

[0090] Step Ⅰ: Use the above method to extract the conceptual model of Neo4j, and get the following Image 6 The conceptual model of the ER diagram is shown. These include label entities of the Person entity and the Book entity with the subscript Label, and the relationship entities of the Friend_Of entity, Has_Read entity, and Has_Write entity with the sublabel Relationship; the Friend_Of entity and the Has_Read entity are relationship entities that contain attributes, and Has_Write Entities are relational entities that do not contain attributes.

[0091] Step Ⅱ: Choose to convert all entities and attributes in the extracted Neo4j ER graphical conceptual model.

[0092] Step Ⅲ: Convert the Friend_Of entity and Has_Read entity containing attributes in Neo4j's ER graphical conceptual model into tables (Tables) in the relational database E...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for model conversion and data migration of Neo4j to a relational database. The method comprises the steps that at the step S1, a conceptual model of the Neo4j is extracted; at the step S2, a user screens label entities and relation entities to be converted; at the step S3, all the relation entities containing attributes are sought, and all the relation entities containing the attributes are converted into a table in the conceptual model of the relational database; at the step S4, all the label entities to be converted are converted into a table in the conceptual model of the relational database; at the step S5, relation attributes which can express relations among each table in the conceptual model of the relational database are established; at the step S6, a complete conceptual model of the relational database is established; and at the step S7, the data migration is carried out. According to the invention, the model conversion method is adopted to solve problems in the data migration of the Neo4j to the relational database; and the data migration becomes more accurate and can be operated more easily.

Description

technical field [0001] The invention relates to the technical field of computer databases, in particular to a model conversion and data migration method from Neo4j to a relational database. Background technique [0002] In the early days of data modeling, there were two main schools. One was the relational model, which gradually evolved into a relational database; the other was the network structure adopted by the semantic network, which has now evolved into a graph database in non-relational data. The most popular and representative database in graph database is Neo4j. [0003] Neo4j is a high-performance, world-leading graph database with a flexible structure and complete transaction features. Compared with relational databases, Neo4j has its own advantages and disadvantages. The advantage of Neo4j is that it saves all the data in the network rather than in the form of tables in relational databases, so it has good query speed and is especially suitable for expressing re...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/28G06F16/21
CPCG06F16/214G06F16/284
Inventor 丁贵广贾天宇李长青
Owner TSINGHUA UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products