• P-ISSN 0974-6846 E-ISSN 0974-5645

Indian Journal of Science and Technology

Article

Indian Journal of Science and Technology

Year: 2022, Volume: 15, Issue: 16, Pages: 718-728

Original Article

A Middleware Model for SQL to NoSQL Query Translation

Received Date:18 February 2022, Accepted Date:16 March 2022, Published Date:29 April 2022

Abstract

Objectives: To propose a suitable model for RDBMS SQL to NoSQL query translation, which works as a middleware between legacy applications and the NoSQL database. This model is expected to translate the SQL queries into NoSQL queries, and forward them to the NoSQL database for execution, and after the execution, the result received from NoSQL should be transferred to the legacy application. Methods: The proposed model is implemented in Java programming language for MySQL (RDBMS) to MongoDB document database query translation. The prototype translates the insert, update, delete, and select SQL queries into equivalent NoSQL query format for MongoDB document database. The middleware transforms the SQL queries to NoSQL query format, and returns the result to the legacy application, which they are expecting from the database. Performance of our model has been evaluated by executing SQL queries such as select, insert, update, delete (with simple and join queries) in Studio 3T, UnityJDBC driver for MongoDB, and our model SQLNo- QT. Findings: The study shows that the proposed model SQL to NoSQL Query Translation Model (SQL-No-QT) performs better in some cases. This model takes 7.5% less time compared to Studio3T, and 38.19% less time compared to UnityJDBC driver in executing select queries, and 78.82% less time compared to Studio3T in executing delete queries in big size database. This model also can execute the join SQL queries for insert, update and delete, which are not available in UnityJDBC driver for MongoDB. Novelty: This model works as a middleware between a legacy application and a NoSQL database, and it removes the need of developing whole new software for legacy application.

Keywords: Database reengineering; database; Query translation; NoSQL; RDBMS

References

  1. Namdeo B, Suman U. Performance Analysis of Schema Design Approaches for Migration from RDBMS to NoSQL Databases. Advances in Data and Information Sciences. 2020;94:413–424. Available from: https://doi.org/10.1007/978-981-15-0694-9_39
  2. Patel AA, Dharwa J, , . Graph Data: The Next Frontier in Big Data Modeling for Various Domains. Indian Journal of Science and Technology. 2017;10(21):1–7. Available from: https://dx.doi.org/10.17485/ijst/2017/v10i21/112828
  3. Rocha L, Vale F, Cirilo E, Barbosa D, Mourão F. A Framework for Migrating Relational Datasets to NoSQL 1. Procedia Computer Science. 2015;51(1):2593–2602. Available from: https://dx.doi.org/10.1016/j.procs.2015.05.367
  4. Zhang C, Xu J. A Unified SQL Middleware for NoSQL Databases. Proceedings of the 2018 International Conference on Big Data and Computing. 2018;p. 14–23. Available from: https://doi.org/10.1145/3220199.3220212
  5. Liao YT, Zhou J, Lu CH, Chen SC, Hsu CH, Chen W, et al. Data adapter for querying and transformation between SQL and NoSQL database. Future Generation Computer Systems. 2016;65:111–121. Available from: https://dx.doi.org/10.1016/j.future.2016.02.002
  6. Ali A, Ibrahim M. NoSQL Database Query Generation using an Automated Approach. Artificial Intelligence Mod Syst. 2017;1(1):32–41. Available from: http://jdconline.net/aims/archive/1(1)/1104.pdf
  7. X DC, Sagardui G, Trujillo S. MQT, an approach for runtime query translation: From EOL to SQL. In: Brucker A, Dania C, Georg G, Gogolla M., eds. CEUR Workshop Proceedings. (pp. 13-22) 2014.
  8. Calil A, Mello RDS. SimpleSQL: A Relational Layer for SimpleDB. In: European Conference on Advances in Databases and Information Systems. (pp. 99-110) Springer, Berlin, Heidelberg. 2012.
  9. Adriana J, Holanda M. NoSQL2: SQL to NoSQL Databases. In: Advances in Intelligent Systems and Computing. (pp. 938-948) Springer International Publishing. 2018.
  10. Namdeo B, Suman U. Schema design advisor model for RDBMS to NoSQL database migration. International Journal of Information Technology. 2021;13(1):277–286. Available from: https://dx.doi.org/10.1007/s41870-020-00515-8
  11. Jsqlparser - Home. Available from: http://jsqlparser.sourceforge.net/ (accessed )

Copyright

© 2022 Namdeo & Suman. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Published By Indian Society for Education and Environment (iSee)

DON'T MISS OUT!

Subscribe now for latest articles and news.