International Journal of Data Structure Studies Review Article
Unleashing Data Velocity: SQL Versus NoSQL Performance Benchmarking of MySQL and MongoDB
Abstract
Due to the increasing amount of unstructured information generated and the growth of big data, RDBMS-based systems could not sustain their hold on new-age applications. The current study provides a performance capture evaluation of SQL and NoSQL schemas, primarily focusing on MySQL versus MongoDB. The main goal is to illustrate how well they work in terms of high-throughput data processing, which is critical for most web-scale and real-time applications. Our experimental method involved generating a synthetic dataset of 100,000 unique rows in Python using the Faker library, selected to preserve realistic variation in the data. The tests were executed within the cloud-based Google Colab Linux virtual machine infrastructure; this ensured hardware consistency and reduced environmental variables. We evaluated two key aspects of performance: bulk insertion throughput and point-query search latency. Here are the empirical results: NoSQL is the winner. The bulk insertion (MongoDB) took 0.2836 s, whereas MySQL took 0.8585 s, so there was a huge performance gap in favor of NoSQL databases. Moreover, search latency results also showed a significant difference where NoSQL has an extremely low retrieval latency at 0.0001 s and SQL with the most recently returned one being 0.0175 s. The study concludes that although MySQL provides an architectural advantage by encompassing transaction consistency (ACID), MongoDB's schema-less document model is more efficient when there are very high data ingestions on a frequent basis along with quick data retrievals. These results give useful information to software architects responsible for selecting database technologies for real-time analytics, social media, and Internet of Things (IoT)-based infrastructure.
Keywords
References (27)
- 1Yunita A, Santoso HB, Hasibuan ZA. “Everything is data”: towards one big data ecosystem using multiple sources of data on higher education in Indonesia. J Big Data. 2022;9(1):91. doi:10.1186/s40537-022-00639-7.
- Khan W, Kumar T, Zhang C, Raj K, Roy AM, Luo B. SQL and NoSQL database software architecture performance analysis and assessments: a systematic literature review. Big Data Cogn Comput. 2023;7(2):97. doi:10.3390/bdcc7020097.
- Xie C, Su C, Littley C, Alvisi L, Kapritsos M, Wang Y. High-performance ACID via modular concurrency control. In: Proceedings of the 25th ACM Symposium on Operating Systems Principles (SOSP 2015); 2015 Oct 4-7; Monterey, CA, USA. New York: Association for Computing Machinery; 2015. p. 279-94. doi:10.1145/2815400.2815430.
- Ren K, Thomson A, Abadi DJ. Lightweight locking for main memory database systems. Proc VLDB Endow. 2012;6(2):145-56. doi:10.14778/2535568.2448947.
- Wang L, Zhang S, Shi J, Jiao L, Hassanzadeh O, Zou J, et al. Schema management for document stores. Proc VLDB Endow. 2015;8(9):922-33. doi:10.14778/2777598.2777601.
- Győrödi CA, Dumşe-Burescu DV, Zmaranda DR, Győrödi RŞ, Gabor GA, Pecherle GD. Performance analysis of NoSQL and relational databases with CouchDB and MySQL for application data storage. Appl Sci. 2020;10(23):8524. doi:10.3390/app10238524.
- Reniers V, Van Landuyt D, Rafique A, Joosen W. On the state of NoSQL benchmarks. In: Proceedings of the 8th ACM/SPEC International Conference on Performance Engineering Companion; 2017 Apr 22-26; L’Aquila, Italy. New York: Association for Computing Machinery; 2017. p. 107-12. doi:10.1145/3053600.3053622.
- Stanescu L, Brezovan M, Burdescu DD. Automatic mapping of MySQL databases to NoSQL MongoDB. In: Proceedings of the 2016 Federated Conference on Computer Science and Information Systems (FedCSIS); 2016 Sep 11-14; Gdansk, Poland. 2016. p. 837-40. doi:10.15439/2016F45.
- Elmasri R, Navathe SB. Fundamentals of Database Systems. 7th ed. Hoboken (NJ): Pearson; 2015.
- Eldeeb T, Burckhardt S, Bond R, Cidon A, Yang J, Bernstein PA. Cloud actor-oriented database transactions in Orleans. Proc VLDB Endow. 2024;17(12):3720–30. doi:10.14778/3685800.3685801.
- Graefe G. Modern B-tree techniques. Found Trends Databases. 2011;3(4):203-402. doi:10.1561/1900000028.
- Chodorow K. MongoDB: The Definitive Guide. 3rd ed. Sebastopol (CA): O’Reilly Media; 2020.
- Kellou-Menouer K, Kardoulakis N, Troullinou G, Kedad Z, Plexousakis D, Kondylakis H. A survey on semantic schema discovery. VLDB J. 2022;31(4):675–710. doi:10.1007/s00778-021-00717-x.
- Haubenschild M, Sauer C, Neumann T, Leis V. Rethinking logging, checkpoints, and recovery for high-performance storage engines. In: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data; 2020 Jun 14-19; Portland, OR, USA. New York: Association for Computing Machinery; 2020. p. 877-92. doi:10.1145/3318464.3389716.
- Brewer E. CAP twelve years later: how the rules have changed. Computer. 2012;45(2):23-9.
- Pereira DA, Ourique de Morais W, Pignaton de Freitas E. NoSQL real-time database performance comparison. Int J Parallel Emerg Distrib Syst. 2018;33(2):144-56. doi:10.1080/17445760.2017.1307367.
- Cooper BF, Silberstein A, Tam E, Ramakrishnan R, Sears R. Benchmarking cloud serving systems with YCSB. In: Proceedings of the 1st ACM Symposium on Cloud Computing (SoCC 2010); 2010 Jun 10-11; Indianapolis, IN, USA. New York: Association for Computing Machinery; 2010. p. 143-54. doi:10.1145/1807128.1807152.
- Iosup A, Ostermann S, Yigitbasi MN, Prodan R, Fahringer T, Epema DHJ. Performance analysis of cloud computing services for many-tasks scientific computing. IEEE Trans Parallel Distrib Syst. 2011;22(6):931-45. doi:10.1109/TPDS.2011.66.
- Kounev S, Lange KD, von Kistowski J. Systems benchmarking. Cham: Springer International Publishing; 2020. doi:10.1007/978-3-030-41705-5.
- Gray J, Sundaresan P, Englert S, Baclawski K, Weinberger PJ. Quickly generating billion-record synthetic databases. In: Proceedings of the 1994 ACM SIGMOD International Conference on Management of Data; 1994 May 24-27; Minneapolis, MN, USA. New York: Association for Computing Machinery; 1994. p. 243-52. doi:10.1145/191839.191886.
- Jain R. The Art of Computer Systems Performance Analysis. New York: John Wiley & Sons; 1990.
- Dean J, Barroso LA. The tail at scale. Commun ACM. 2013;56(2):74-80. doi:10.1145/2408776.2408794.
- Rabl T, Gómez-Villamor S, Sadoghi M, Muntés-Mulero V, Jacobsen HA, Mankovskii S. Solving big data challenges for enterprise application performance management. Proc VLDB Endow. 2012;5(12):1724-35. doi:10.14778/2367502.2367512.
- Schad J, Dittrich J, Quiané-Ruiz JA. Runtime measurements in the cloud: observing, analyzing, and reducing variance. Proc VLDB Endow. 2010;3(1-2):460-71. doi:10.14778/1920841.1920902.
- Ramakrishnan R, Gehrke J. Database Management Systems. 3rd ed. New York: McGraw-Hill; 2003.
- Tanenbaum AS, Bos H. Modern Operating Systems. 4th ed. Boston: Pearson; 2014. p. 89-92.
- Kounev S. A new course on systems benchmarking: for scientists and engineers. In: Companion of the ACM/SPEC International Conference on Performance Engineering (ICPE 2021); 2021 Apr 19-23; virtual conference. New York: Association for Computing Machinery; 2021. p. 127. doi:10.1145/3447545.3451198.