# AMANDA: A Middleware for Automatic Migration between Different Database Paradigms
## 1 Introduction
The major part of the previous studies present a focus on database metadata evaluation [34; 35; 36], schema crawling [18], and Entity Relational (ER) diagram conversion [37], thus not allowing users to select a database subset or table attributes to migrate. Other studies [21; 38] depend on third-party tools, e.g., Kafka and Apache Phoenix, showing a tight dependency on them. Furthermore, the related research works can not be extended to support more than one source and target database. On the other hand, our method relies on the user input, e.g., the tables and attributes that will be migrated. With such data, the migration tool runs SELECT statements to obtain the data from the RDBMS, and then migrates the obtained data to Dgraph. Furthermore, new modules can be developed and integrated into the proposed migration tool to support migrations between other databases. Since SQL statements are run, our migration tool does not rely on third-party tools like the tools proposed by [21; 38] do. To the best of our knowledge, we have found no relational to non-relational database migration middleware that are flexible and based on direct queries. In addition, no research studies have been found on solutions working with more than a single source and target database. Furthermore, no tool that migrates data to Dgraph could be found, except for Dgraph's built-in migration tool, although it migrates only from MySQL databases. Hence, a migration middleware with support for additional RDBMS, may allow for a smoother transition out of a relational database. Examples of RDBMS are MySQL and Postgres. In this work, the examples will always refer to Postgres as the Relational Database Management System (RDMS) and Dgraph as the graph database, a type of NoSQL database. Since data are a critical asset for companies that need to stay competitive in their respective markets, and since new technologies are emerging to handle such data, we defined the following research question:  
* How to provide automatic migration between different database paradigms, ensuring data reliability with good computational performance? To answer the research question, this study presents AMANDA, a Middleware for **A**utomatic **M**ig**r**A**tio**N of different **DA**tabases. AMANDA is capable of migrating between more than one source and target database. We conducted an experimental evaluation of a migration from an RDBMS to an NoSQL graph-oriented database to evaluate the middleware. We highlight the main contributions:* A flexible middleware to support different database paradigms migrations, considering specific definitions (i.e., tables and attributes), does not require the migrating of all of the databases, as in the previous works. In addition, the middleware is independent and extensible to other databases. * Users can choose what to migrate, since the migration is based on what tables and attributes users choose to migrate. With the values informed by the user, the tool runs SQL queries to obtain the data. * Evaluation performance experiments with real and public databases show a 100% of data migration success that is 26 times faster than previous tools and approaches. This article is structured as follows: Section 2 presents and discusses existing related research work; Section 3 presents the proposed migration method; Section 4 presents the experiments and the method evaluation; Section 5 discusses the take outs; and, finally, Section 6 concludes this work.