Check patentability & draft patents in minutes with Patsnap Eureka AI!

A method of model conversion and data migration from relational database to mongodb

A model conversion and database technology, applied in the field of computer databases, can solve problems such as low efficiency and guide data migration, and achieve the effect of improving performance and simple and efficient data migration.

Active Publication Date: 2019-09-03
TSINGHUA UNIV +1
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] 1) The common migration method is to directly convert the table (table) in the relational database to the collection (Collection) in MongoDB, without using the flexible and changeable characteristics of MongoDB's nested relationship in data structure
[0004] 2) Some studies are related to the data model of MongoDB. These studies prove that the data model of the relational database can be used to guide the establishment of the MongoDB data model through relational algebra. The results of the conversion are used to guide the data migration. In the end, the data migration needs to be completed manually. Once the data model of the relational database changes, all the work will have to start from scratch, resulting in low efficiency.

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 method of model conversion and data migration from relational database to mongodb
  • A method of model conversion and data migration from relational database to mongodb
  • A method of model conversion and data migration from relational database to mongodb

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0095] Such as Figure 4 As shown, the country table and city table are one-to-many relationships with the city table and address table, and the "frequent connection" label is included between the two tables, indicating that the join operation is often performed; and the address table does not contain the "large data volume", "frequently modified" or "frequently inserted" tags, so the "embedded child entity" tag is added to the relationship between the city table and the address table. There is a "large data volume" label on the city table, so the "reference" label is added to the relationship between the country table and the city table.

[0096] S32. Convert the conceptual model to the physical model of MongoDB through the model conversion algorithm; as Figure 5 As shown, it specifically includes the following steps:

[0097] B1. Convert the conceptual model containing operation labels into a directed graph; where each entity is a point on the directed graph, and the "emb...

Embodiment 2

[0103] Such as Figure 6As shown, take part of the sample database sakila of the MySQL database as an example. Firstly, the conceptual model is extracted from the existing relational database, and a descriptive label is added to the conceptual model according to the log information of the relational database. It should be noted that this embodiment only uses the "frequent connection" label; as shown in Figure (A), the staff table and store table and the address table and store table often perform join operations, and generate operation labels according to step S31, and convert It is a directed graph as shown in (B). Since the directed graph contains a cycle, the heustic algorithm is used to solve the ring to form a directed acyclic graph as shown in (C), and then the directed acyclic graph The graph is topologically sorted to determine the nesting order between entities. Finally, according to the result of topological sorting and the conceptual model, we get the physical mode...

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 from a relational database to MongoDB. The method comprises the following steps of extracting a conceptual model of the relational database; analyzing log information of the relational database to obtain descriptive characteristics of the relational database; performing model conversion according to the descriptive characteristics to obtain a physical model of the MongoDB; and performing data migration according to the physical model of the MongoDB. According to the method, the log information of the relational database is mined and more scientific model conversion is performed based on the information mining to form a complete and effective data model; and the model conversion is combined with the data migration, and the data migration is performed based on a model conversion result, so that the data migration is simpler and more efficient, and the performance of an application is improved.

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 a relational database to MongoDB. Background technique [0002] As the amount of data grows and the data structure becomes more and more flexible, the distributed document storage database (MongoDB) has replaced relational databases in many fields. Although the relational database is still the most widely used database at present, with the advent of the big data era, many applications generally have performance bottlenecks in the process of using the relational database. People hope to use non-relational databases such as MongoDB to replace the original relational databases, and migrate data stored in relational databases to non-relational databases such as MongoDB to obtain better performance, but the existing technology has the following disadvantages : [0003] 1) The common migration method is to directly convert ...

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
IPC IPC(8): G06F16/28G06F16/25G06F16/21
Inventor 贾天宇丁贵广李长青孙鹏董艳华李志文
Owner TSINGHUA UNIV
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More