Comparative Study of Query Performance between Relational Database and NoSQL Database for Information System: A Case Study of the Asset Database of Information Technology Service Center
Main Article Content
Abstract
This research aimed to study approaches for data storage in NoSQL databases and compare the query performance between relational databases and NoSQL databases for an information system. The case study involved the asset dataset of the Information Technology Service Center, Chiang Mai University. The relational database used in the study was MySQL, which stores data in tables consisting of rows and columns. The NoSQL database used was MongoDB, which stores data as documents with field-value pairs. PHP was used to develop a web application for testing. The researcher designed query commands and developed a web application to evaluate the query performance between the two types of databases.The initial results indicated that querying asset data using the relational database was faster than using the NoSQL database. However, the results from both databases were accurate and consistent, yielding 100% correctness. The slower performance of the NoSQL database was attributed to its data structure. When converted from a relational database, data in the NoSQL database was stored as a Referenced Document across separate collections. This required the use of functions to join data from multiple collections, leading to increased processing time and slower query performance. Further analysis was conducted to confirm that NoSQL databases could handle large-scale data more efficiently than relational databases. A larger sample database containing employee and salary data, with a data size 100 times larger than the asset dataset, was used for additional testing. The results demonstrated that, for queries involving a single table or a single collection, both with and without conditions, NoSQL databases outperformed relational databases in query performance. To apply NoSQL databases effectively in future asset management systems, it is recommended to modify the data structure from Referenced Document to Embedded Document. This structure consolidates all related information within a single document, allowing for faster query processing. Additionally, the application code should be adjusted to support and manage NoSQL databases efficiently.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
The content and information in articles published in the Journal of Advanced Development in Engineering and Science are the opinions and responsibility of the article's author. The journal editors do not need to agree or share any responsibility.
Articles, information, content, etc. that are published in the Journal of Advanced Development in Engineering and Science are copyrighted by the Journal of Advanced Development in Engineering and Science. If any person or organization wishes to publish all or any part of it or to do anything. Only prior written permission from the Journal of Advanced Development in Engineering and Science is required.
References
Kaensar, C. (2012). Analysis of the Query Plan for Assessing Optimizer Performance of SQL Select Statemant. The Journal of KMUTNB, 22(3), 721-734. (in Thai)
MySQL. (2021). MySQL 5.7 Reference Manual. Available from https://dev.mysql.com/doc/ refman/5.7/en/language-structure.html. Accessed date: 9 November 2021.
Timasornwichakit, R. (2017). Comparative Study between Big Data Technology (Hadoop /MapReduce) and Relational Database Query System (MySQL) Case study: Healthcare Dataset, (Master thesis, Dhurakij Pundit University). (in Thai)
Ngoenbumroong, A. (2020). Performance Comparison Between Sql-Based & Document - Based Data Warehouse, (Master thesis, Kasetsart University). (in Thai)
Butploy, N. & Verapan, P. (2024). Comparative Analysis of Database Management Approaches: Relational and NoSQL Databases - A Case Study of the Student Database at Kamphaeng Phet Rajabhat University. Journal of Technology Management and Digital Innovation, 1(1), 1-10. (in Thai)
Sumathi, S. & Esakkirajan, S. (2007). Fundamentals of relational database management systems. New York: Springer Berlin Heidelberg.
Jaratsantijit, Y. (2019). Managing Data with MongoDB, a NoSQL Database, Chiang Mai: Jarus Printing Co., Ltd. (in Thai)
Tiwari, S. (2011). Professional NoSQL. Indianapolis: John Wiley & Sons, Inc.
Tahaghoghi, S. & Williams, H. (2007). Learning MySQL. California: O’Reilly Media, Inc.
Navicat. (2021). Manuals. Available from https://www.navicat.com/en/support/online - manual. Accessed date: 22 December 2021.
MongoDB. (2022). MongoDB Documentation. Available from https://www.mongodb.
com/docs/manual/. Accessed date: 15 January 2022.
Studio 3T. (2022). Getting Started with Studio. Available fromhttps://studio3t.com/
knowledge-base/articles/getting-started/. Accessed date: 26 January 2022.
PHP. (2021). PHP Manual. Available from https://www.php.net/manual/en/book.mysqli. php. Accessed date: 25 November 2021.
PHP. (2021).Using the PHP Library for MongoDB (PHPLIB). Available from https://www. php.net/manual/en/mongodb.tutorial.library.php. Accessed date: 3 April 2022.