# AMANDA: A Middleware for Automatic Migration between Different Database Paradigms
## 2 Related Works  
In this section, we enumerate and describe the various proposed solutions related to the task of migrating from relational to non-relational databases. The authors in [34] proposed a new algorithm for relational to graph database conversion; more specifically, to Neo4j. A comparison was carried out between their solution, R2G [39], and RDB2 Graph [40]. Such comparison entails nodes, edges, properties, and size. Their solution presented a smaller number of nodes and edges, with the same number of properties of RDB2 Graph, fairly improved querying times in comparison to RDB2 Graph, and slightly improved querying times in comparison to R2G. Regarding the use of graph databases in big data and the conversion from relational to graph databases, the authors in [35] developed a tool to migrate databases from MySQL to Neo4j. Such a tool makes use of joins, represented by a foreign key relationship. Each cell in a table becomes an edge, which then connects to its column name and to one or a plurality of the other fields of its row. Then, the graph model is automatically generated with the aid of the table structure, reading the table data and finding distinct values. Such a conversion is performed through the creation of an edge in each row using the key value in the table and connecting it to other non-key values and labeling the edge with the attribute names. If the table has a compound key, then a hyper edge is created to connect the key domain values to other non-key domain values. Another migration tool was proposed in [18] that migrates a relational (MySQL) to a graph database (Neo4J). Such a tool works in two stages: (I) it uses a SchemaCrawler to extract the table metadata and (II) it converts the extracted data to vertices and edges and imports them into Neo4J through its API. Moreover, the authors survey the best practices for converting data from relational to graph databases. This work use a non-publicly available data set in its experiments. Using algorithms such as those presented in [39; 41] as metrics, the authors in [42] demonstrated the usage of functional dependencies for graph database conversion. The authors have shown, through survey studies, that the algorithms have flaws, and, hence, the authors have proposed fixes for the algorithms. In comparison to the aforementioned algorithms, AMANDA has shown improvements when it comes to the required execution time for a database conversion, as well as a finer query answer correctness in comparison to the answers presented by relational databases. The datasets used in the paper are: (i) the Order store database, a relational database [41]; (ii) the NorthWind dataset, a subset of the Wikipedia-2008 database; and (iii) a subset of the IMDb database. The initial relational database was the SQL Server and the resulting graph database was Neo4j. The queries were based on the Wikipedia-2008 dataset. Some algorithms have been proposed to automatically migrate relational to graph databases. The authors in [37] use an ER diagram as a key part of the migration process, providing information that will be passed on to edges and nodes of the graph. Upon evaluating the algorithm, the authors state that, for an ER diagram with \(n\) entities, \(m\) relationships, and \(p\) parent-child relationships, for \(p<n\), the time complexity is given by \(\mathcal{O}(n*m+n*p)\), equivalent to \(\mathcal{O}(n^{2})\). The method alleviates the influence of model disparities between relational and graph databases, establishing data integrity and constraint. In the experiments, an SQL database is migrated to a Neo4j database, and the NorthWind and IMDb datasets are used. The authors demonstrated that queries using multiple tables are more efficient in Neo4j than in the SQL Server. The authors in [36] propose a migration algorithm from a relational database (MySQL) to a graph database (Neo4j). The algorithm is described in detail, showing how tables and join operations on the relational database are mapped into vertices and edges on the graph database.