MIGRATION OF RELATIONAL DATABASE TO NOSQL DOCUMENT-ORIENTED DATABASE - Tandya, Wilson
With the increasing popularity of NoSQL document-oriented databases, there is a need to migrate from relational databases to document-oriented NoSQL databases. One of the main advantages of document-oriented NoSQL databases is the ability to perform embedding and referencing. Stanescu et al. (2016) conducted research on a migration algorithm from relational database MySQL to NoSQL database MongoDB, which utilizes relational database metadata. However, the developed algorithm heavily relies on whether tables have foreign keys and/or are referenced by other tables, which can result in suboptimal mapping of the migration model. Considering that a database migration is only performed on a database that has been or is currently in use, the workload information concept used in the research by Lima and Mello (2015) can be adapted to implement a better mapping model. This paper develop a migration algorithm from relational databases to document-oriented NoSQL databases by utilizing workload information to determine the use of embedding and referencing. The algorithm consists of two parts: a schema conversion algorithm that produces a document-oriented NoSQL database schema and a data mapping algorithm that generates JSON files. The constructed algorithm also adds table evaluation sequencing to complement the migration algorithm from the research by Stanescu et al. (2016). The migration testing results from the relational MySQL database to the NoSQL MongoDB database using the algorithm developed in this paper indicate that the resulting MongoDB database performs better compared to the algorithm researched by Stanescu et al. (2016) in all tested aspects, except in cases where reading documents embedded in a collection in the relational database with high read access frequency.