Data Migration Methodology From Relational To Nosql Databases
Data Migration Methodology From Relational To Nosql Databases
International Journal of Computer, Electrical, Automation, Control and Information Engineering Vol:9, No:12, 2015
paper is to present a methodology for data migration from RDBMS to In this article, two types of databases will be used for data
NoSQL database. To illustrate this methodology, we implement a migration. Source database is relational, and target database is
software prototype using MySQL as a RDBMS and MongoDB as a a recent one in the market: NoSQL database [4].
NoSQL database. Although this is a hard engineering work, our • Relational database: A relational database or RDBMS is a
results show that the proposed methodology can successfully database based on a relational model that was developed
accomplish the goal of this study.
by Edgar Codd in 1970 [5]. The basic notion of this
database is the separation into tables for storing all these
Keywords—Data Migration, MySQL, RDBMS, NoSQL,
MongoDB. data. The tables are structured in rows and columns,
where they can be linked with each other by foreign keys.
I. INTRODUCTION A big advantage of this database type is its ease to use, so
the untrained business users can create easy own
C URRENTLY, there are many types of databases in which
large amount of data are stored. Sometimes, it is
necessary to migrate data from one type of database to another
databases. However, the huge growth of new applications
that depend on storing and processing big amount of data
which added more challenges to the RDBMS, and where
or to create new database implemented in another one and
the classical SQL systems being inappropriate in a variety
move data from old database to a new one. In these cases, the
of ways, lead to a new database model called NoSQL.
process of data migration consists of three steps called ETL
• NoSQL Database: NoSQL databases have emerged
(Extract, Transform and Load) [1]: (1) Extraction data from
tremendously in the last years owing to their less
the source database, (2) Transformation data, and (3)
constrained structure, scalable schema design, and faster
Migration of data to the target database.
access compared to relational databases. The main feature
There is a variety of reasons for data migration, including
that makes difference in the model of NoSQL data is that
server, storage equipment replacements or upgrades. In this
it does not use the table as storage structure of the data. In
regard, we only state few of these reasons [1]-[3]:
addition, its schema is very efficient in handling the
• Upgrading to new version database: In the case of
unstructured data. The NoSQL database takes many
upgrading of software equipment in the organization,
modeling techniques like key-value stores, document data
including new version of database, we need to migrate
model, and graph. The following illustrates this clearly
data to new database.
[6], [7]:
• Existing database is insufficient: In the case of a large
- Key-value stores: Data is stored as values with a unique
increase of stored data, there is insufficient capacity or
key assigned to each value. Also, this type of NoSQL
speed of database.
database allows for keeping high performance in reading
• Changing of organization policy: In the case of changing
and/or writing. Currently, the best solutions having
security or another type of policy in organization, we need
adopted the system of key-value are Voldemort, Redis
to upgrade to better database.
and Riak.
- Document stores: The concept of this database which is
H.M. is with the Department of Computer Science, Laboratory of based on documents is a kind of extension of the
Engineering and Information Systems, Faculty of Sciences Semlalia, Cadi key/value database in which the value is represented as a
Ayyad University, Marrakesh, Morocco (corresponding author to provide document containing data represented in standard formats
phone: +212 677 34 63 41; e-mail: [email protected]).
B.A. is with the Department of Mathematics and Computer Science, (JSON: JavaScript Object Notation, XML, etc.). All
Faculty of Polydisciplinary, Safi, Cadi Ayyad University, Morocco (e-mail: documents are stored in collections (equivalent to tables
[email protected]) in SQL). The advantage of database oriented documents is
B.O. is with the Department of Computer Science, Laboratory of
Engineering and Information Systems, Faculty of Sciences Semlalia, Cadi to retrieve a set of hierarchically structured information
Ayyad University, Marrakesh, Morocco (e-mail: [email protected]). from a unique key. The most current implementations are
International Scholarly and Scientific Research & Innovation 9(12) 2015 2404 scholar.waset.org/1999.4/10004179
World Academy of Science, Engineering and Technology
International Journal of Computer, Electrical, Automation, Control and Information Engineering Vol:9, No:12, 2015
The rest of the paper is organized as follows. The second Fig. 2 A methodology for data migration
section explains concisely the proposed methodology. In third
section, the software prototype for demonstrating the proposed
methodology is illustrated. Finally, conclusions and further
research are offered in the last section.
International Scholarly and Scientific Research & Innovation 9(12) 2015 2405 scholar.waset.org/1999.4/10004179
World Academy of Science, Engineering and Technology
International Journal of Computer, Electrical, Automation, Control and Information Engineering Vol:9, No:12, 2015
International Scholarly and Scientific Research & Innovation 9(12) 2015 2406 scholar.waset.org/1999.4/10004179
World Academy of Science, Engineering and Technology
International Journal of Computer, Electrical, Automation, Control and Information Engineering Vol:9, No:12, 2015
using JAVA on a PC platform. The operation sequence will be Finally, the data are inserted in MongoDB. Fig. 9 presents
demonstrated in the following paragraphs, through the use of data migrated in collection forms where the user can access to
several screenshots. all the features of MongoDB using the tabs presented in this
Initially, the user must connect to MySQL system through interface: Documents, Collections, and Requests.
the interface shown in Fig. 7 for choosing the source database
which will migrate to MongoDB.
International Science Index, Computer and Information Engineering Vol:9, No:12, 2015 waset.org/Publication/10004179
ACKNOWLEDGMENT
The authors wish to acknowledge the contributions of other
members of the department of computer science for their
helpful discussions and the availability of all resources that
have helped make this work in the best conditions. They also
wish to thank Mr. Redouane Boulguid for pointing out many
English corrections that lead to the improvement of the paper.
The authors would also like to thank the reviewers for their
remarks and suggestions.
Fig. 8 Migration to MongoDB
International Scholarly and Scientific Research & Innovation 9(12) 2015 2407 scholar.waset.org/1999.4/10004179
World Academy of Science, Engineering and Technology
International Journal of Computer, Electrical, Automation, Control and Information Engineering Vol:9, No:12, 2015
REFERENCES
[1] B. Walek, K. Cyril, “A methodology for Data Migration between
Different Database Management Systems”. World Academy of Science,
Engineering and Technology Vol:6 2012-05-23
[2] B. Walek, K. Cyril, “Data Migration between Document-Oriented and
Relational Databases”. World Academy of Science, Engineering and
Technology Vol:6 2012-09-22
[3] M. Alam, and Krishan Wasan S. “Migration from Relational Database
into Object Oriented Database”. Journal of Computer Science 2 (10):
781-784, 2006.
[4] X. Lixian, L. Yanhong, “Design and application of data migration
system in heterogeneous Database”. International Forum on Information
Technology and Applications 2010.
[5] N. Cory, L. Travis, I. Reenu, H. Gary, “Nosql Vs Rdbms - Why There Is
Room for Both”. Proceedings of the Southern Association for
Information Systems Conference, Savannah, GA, USA March 8th–9th,
2013.
[6] M.A Mohamed, O.G Altrafi, M.O Ismail, “Relational vs. NoSQL
Databases: A Survey”. International Journal of Computer and
International Science Index, Computer and Information Engineering Vol:9, No:12, 2015 waset.org/Publication/10004179
International Scholarly and Scientific Research & Innovation 9(12) 2015 2408 scholar.waset.org/1999.4/10004179