Have a personal or library account? Click to login
Enhancement of a Transformation Algorithm to Migrate SQL Database into NoSQL Graph Database Cover

Enhancement of a Transformation Algorithm to Migrate SQL Database into NoSQL Graph Database

Open Access
|Jun 2024

Figures & Tables

CSVComma-separated values
DBMSDatabase Management System
IDEIntegrated Development Environment
JSONJavaScript Object Notation
Neo4jNetwork Exploration and Optimization “for” Java
NOSQLNot Only Structure Query Language
RDBMSRelational Database Management System
SQLStructured Query Language
dsj-23-1655-g1.png
Figure 1

Model Transformation from Relational to NoSQL Graph Database.

dsj-23-1655-g2.png
Figure 2

Migration of Database from Relational Database MySQL Server to NoSQL Graph Database Neo4j.

dsj-23-1655-g3.png
Figure 3

Relational Metamodel.

dsj-23-1655-g4.png
Figure 4

Neo4j Metamodel.

Table 1

Differences between Meta Analyzer Tools.

CriteriaSchemaCrawlerDbSchemaSchemaSpy
TypeFreeCommercialFree
Export typeCSV, HTML, JSON, Plain textHTML, MS Excel, PDFHTML
Runs onLinux, Mac OS, WindowsWindowsLinux, Mac OS, Windows
Table 2

Enhancing an Algorithm Proposed by Shabana et al.

ALGORITHM PROPOSED BY SHABANA RAMZAN ET AL. TO MIGRATE DATA FROM MS SQL SERVER TO ORACLE NOSQLALGORITHM AFTER MODIFICATION TO MIGRATE DATA FROM MYSQL SERVER TO NEO4J GRAPH DATABASE
  1. Construct: make a table object of the source.

  2. Construct: Make a lean of the instances in the target tabular from those in the source table.

  3. Representing: Target tabular instances map to objects in the source table.

  4. Construct: make an article for every section of the source table.

  5. Mapping: Map from target field object to source column object.

  6. If value is true

  7. Pick the rule for the transformation.

  8. // the standard is appropriate or not when more than one rule is free for a similar sort of item.

  9. endif

  10. Construct: The object for the target table is created.

  11. Construct: Every column’s target object is made.

  12. Select primary key.

  13. Keep a background marked by changed objects // to prevent the creation of target objects in duplicate.

  1. Construct: make a tabular form of the source.

  2. Construct: Creating a rundown of targeted nodes from the source table’s items. // Table object of SQL table is addressed as a named hub in a diagram data set

  3. Mapping: Target node objects map to objects in the source table. // A node in a graph database has been used to map the source table’s schema.

  4. Construct: make an article for every section of the source table.

  5. Mapping: Target node property to object map from source column. // Oracle’s NoSQL source column is mapped with a table object, whereas the graph database’s source column is mapped with a node property.

  6. If value is true

  7. Pick the rule for the transformation.// transformation rule that has been modified in accordance with the data set must be mapped and transformed from a SQL to a NoSQL graph database, whereas the previous algorithm utilized transformation rule that was transferred from an Oracle non-structured database to a relational database.

  8. // the standard is appropriate or not when more than one rule is free for a similar sort of item.

  9. endif

  10. Create: The instance with the targeted labeled node is created.// In a graph database, the object that represents the source table is labeled a node.

  11. Construct: target hub property of every section is made. // the section is planned and changed as hub property in a diagram data set.

  12. Select primary key.

  13. Keep a background marked by changed objects // to prevent the creation of target objects in duplicate.

dsj-23-1655-g5.png
Figure 5

Retailer of Scale Models of Classic Cars Database.

Table 4

Schematic View of sampledb Database.

FIELDTYPENULLKEYDEFAULTEXTRA
user_idintNOPRINULLauto_increment
Usernamevarchar(255)YESNULL
first_namevarchar(50)YESNULL
last_namevarchar(50)YESNULL
Gendervarchar(10)YESNULL
Passwordvarchar(50)YESNULL
StatustinyintYESNULL
dsj-23-1655-g6.png
Figure 6

Entity Relationship Diagram for northwind Database.

dsj-23-1655-g7.png
Figure 7

Entity Relationship Diagram for hrdb Database.

dsj-23-1655-g8.png
Figure 8

Entity Relationship Diagram for chinook Database.

dsj-23-1655-g9.png
Figure 9

The Process of Schema Mapping for Data Transformation (Legler & Naumann 2007).

dsj-23-1655-g10.png
Figure 10

Query Execution Time for classicmodels Database.

dsj-23-1655-g11.png
Figure 11

Query Execution Time for sampledb Database.

dsj-23-1655-g12.png
Figure 12

Query Execution Time for northwind Database.

dsj-23-1655-g13.png
Figure 13

Query Execution Time for hrdb Database.

dsj-23-1655-g14.png
Figure 14

Query Execution Time for chinook Database.

Table 5

Data Conversion and Migration.

DATABASENUMBER OF RECORDSTRANSFORMATION TIME (IN SECONDS)RELATION (YES/NO)
Classicmodels3,86411 sec.Yes
Sampled50,00012 sec.No
Northwind93210 sec.Yes
Hrdb1368 sec.Yes
chinook15,5878 sec.Yes
Table 6

Query Elapsed Time in Milliseconds for Database classicmodels.

NO.QUERYELAPSED TIME MYSQLELAPSED TIME NEO4J
1.Insert32 ms4.33 ms
2.Delete703 ms74 ms
3.Retrieve20 ms46.67 ms
4.Multiple retrieve3 ms18.33 ms
5.Retrieval with single join47 ms11.33 ms
6.Retrieval with multiple join15 ms1360 ms
7.Update47 ms51.33 ms
Table 7

Query Elapsed Time in Milliseconds for Database Sampled.

NO.QUERYELAPSED TIME MYSQLELAPSED TIME NEO4J
1.Insert0.0 ms52 ms
2.Delete16 ms6 ms
3.Retrieve16 ms1209 ms
4.Multiple retrieve47 ms1900 ms
5.Retrieval with single joinNo joinNo join
6.Retrieval with multiple joinNo joinNo join
7.Update0.0 ms287 ms
Table 8

Query Elapsed Time in Milliseconds for Database northwind.

NO.QUERYELAPSED TIME MYSQLELAPSED TIME NEO4J
1.Insert46 ms216 ms
2.Delete31 ms28 ms
3.Retrieve0.0 ms215 ms
4.Multiple retrieve31 ms156 ms
5.Retrieval with single join47 ms199 ms
6.Retrieval with multiple join130 ms212 ms
7.Update63 ms330 ms
Table 9

Query Elapsed Time in Milliseconds for Database hrdb.

NO.QUERYELAPSED TIME MYSQLELAPSED TIME NEO4J
1.Insert16 ms56 ms
2.Delete381 ms60 ms
3.Retrieve0.0 ms16 ms
4.Multiple retrieve0.0 ms32 ms
5.Retrieval with single join0.0 ms17 ms
6.Retrieval with multiple join0.0 ms11 ms
7.Update78 ms143 ms
Table 10

Query Elapsed Time in Milliseconds for Database Chinook.

NO.QUERYELAPSED TIME MYSQLELAPSED TIME NEO4J
1.Insert63 ms305Ms
2.Delete15 ms61 Ms
3.Retrieve0.0 ms160 ms
4.Multiple retrieve0.0 ms124 ms
5.Retrieval with single join16 ms183ms
6.Retrieval with multiple join16 ms156036 ms
7.Update16 ms294 ms
Language: English
Submitted on: Nov 21, 2023
Accepted on: May 18, 2024
Published on: Jun 10, 2024
Published by: Ubiquity Press
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2024 Hira Lal Bhandari, Roshan Chitrakar, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.