# AMANDA: A Middleware for Automatic Migration between Different Database Paradigms
## 2 Related Works
The migrated dataset used is Northwind. A query speed comparison between Neo4j and MySQL indicated that join-sensitive queries have a better performance on Neo4j than MySQL, and non-join-sensitive queries are better on MySQL than Neo4j. The research results have shown that polyglot persistence, a feature that uses more than one type of database and carefully chooses the best or most suitable, makes sure that the drawbacks from one database are scaled down by the benefit of another database, thus improving the performance efficiency. Rules have also been proposed from non-relational to relational database migration. The authors in [11] suggest traditional rules to be used when data are converted from an Oracle database to a MongoDB one. The rules cover the following cases: association _1\(\times\)N_ and _N\(\times\)N_, composition, aggregation, and inheritance. The authors state that the rules support time-varying data and time series. Their work has not made any prototypes available nor has conducted any experiments. The authors in [43] redesign a database management system in order to make it a hybrid database system; that is to say, one where both the SQL and NoSQL paradigms are able to operate seamlessly. To achieve this outcome, the authors use MySQL as a relational database and a Resource Description Framework (RDF) to store unstructured data, properly enabling graph queries. To make the SQL and NoSQL parts work together, the authors use the concept of ontology, following the pattern OWL (Web Ontology Language) and tools that support both the usage of SQL and RDF. The authors in [38] propose a method to migrate data from MySQL to HBase (a column-oriented, non-relational database) by using Apache Phoenix--a relational database engine working as an SQL layer on top of HBase. Phoenix cannot handle complex queries, and, for this reason, the authors used some techniques to migrate the data, e.g., (1) query translation, where nested queries are rewritten into temporary tables; (2) data denormalization in order to avoid join operation among tables, thus improving the reading performance; and (3) a covered index in order to reduce the table access time. The authors also use Support Vector Machines (SVN) to classify a given query as having a better performance in a relational database or in an NoSQL one. The data set used in the experiment is the TPC-H, a benchmark published by the Transaction Processing Performance Council. A migration tool that works with two approaches in parallel (migration of static data and real-time data) was proposed by [21]. Its supported databases include MySQL (as the source) and MongoDB (as the target). A snapshot of the whole table is built in a JSON for static data, and, for each table snapshot, a migration thread is run. On the other hand, real-time migration is handled by a non-interactive background process (daemon) that listens to the source database for changes and sends them to the real-time migration module. In such a migration tool, the experiments were conducted employing a non-publicly available data set. Table 1 summarizes the related works. The related works use database metadata, formal rules to transform an ER diagram into a graph model, query translation, database snapshot, and stream techniques. Conversely, our work presents and queries the source database directly according to that defined in _schema.json_--a configuration file. Furthermore, the middleware is flexible in order to support more source and target databases. More details are provided in Section 3.