Analyzing CRUD Performance and Data Integrity Trade-offs in MariaDB: The Impact of Indexes, Foreign Keys, and Referential Actions

Yusuf Sudiyono, Jaka Suwita, Winanti Winanti

Abstract


Data integrity in RDBMS frequently raises concerns regarding computational efficiency, particularly when handling large-scale datasets. This study analyzes the trade-off between execution time and storage overhead in MariaDB (InnoDB storage engine) by evaluating different configurations of indexing, foreign key constraints, and the ON DELETE CASCADE rule. A quantitative benchmarking approach was used through a synthetic dataset consisting of 3,000,000 rows distributed in a one-to-many relationship across 100,000 parent records. Performance evaluation focused on CRUD and JOIN operations, with 30 iterations conducted under each configuration and analyzed using descriptive statistical measures, including mean and standard deviation. The experimental results show that B-Tree indexes drastically accelerate read operations (SELECT and JOIN), with JOIN execution improving by more than 1,400-fold, from an average of 0.8516 s without an index to 0.0006 s with indexing, despite increasing disk storage overhead by 57.59 MB to 72.64 MB. Conversely, for write operations (INSERT and UPDATE), foreign key constraints and the CASCADE rule create additional latency of up to 0.0019 s due to relational integrity validation and real-time lock management within the storage engine layer. The study concludes that enforcing strict referential integrity in RDBMSs results in a performance decline for write operations; therefore, the database schema design must be precisely tailored to the specific characteristics of the application workload. The contribution of this study lies in providing an empirical comparison of the combined effects of B-Tree indexing and referential integrity actions on storage overhead, read performance, and write latency using a homogeneous multi-million-row relational dataset.

Keywords


MariaDB; Index; Foreign Key; ON DELETE CASCADE; Database Performance

Full Text:

PDF

References


W. Khan, T. Kumar, C. Zhang, K. Raj, A. M. Roy, and B. Luo, ‘SQL and NoSQL Database Software Architecture Performance Analysis and Assessments—A Systematic Literature Review’, Jun. 01, 2023, MDPI. doi: 10.3390/bdcc7020097.

E. Pina, F. Sá, and J. Bernardino, ‘NewSQL Databases Assessment: CockroachDB, MariaDB Xpand, and VoltDB’, Future Internet, vol. 15, no. 1, 2023, doi: 10.3390/fi15010010.

M. Kvet and J. Papan, ‘The Complexity of the Data Retrieval Process Using the Proposed Index Extension’, IEEE Access, vol. 10, 2022, doi: 10.1109/ACCESS.2022.3170711.

C. Wongkham, B. Lu, C. Liu, Z. Zhong, E. Lo, and T. Wang, ‘Are Updatable Learned Indexes Ready?’, Sep. 2022, doi: 10.14778/3551793.3551848.

X. Zhang et al., ‘Facilitating Database Tuning with Hyper-Parameter Optimization: A Comprehensive Experimental Evaluation’, in Proceedings of the VLDB Endowment, 2022. doi: 10.14778/3538598.3538604.

B. Milicevic and Z. Babovic, ‘A systematic review of deep learning applications in database query execution’, J. Big Data, vol. 11, no. 1, 2024, doi: 10.1186/s40537-024-01025-1.

S. Kanwal, N. R. Chaudhry, R. Choudhary, Y. A. Shaik, P. Yadav, and A. Rashid, ‘Foreign Key Constraints to Maintain Referential Integrity in Distributed Database in Microservices Architecture’, 2025. [Online]. Available: www.ijacsa.thesai.org

D. Petersohn et al., ‘Towards Scalable Dataframe Systems’, Jun. 2020, [Online]. Available: http://arxiv.org/abs/2001.00888

G. Fulk, ‘Descriptive Statistics, An Important First Step’, 2023. doi: 10.1097/NPT.0000000000000434.

G. Kotronoulas et al., ‘An Overview of the Fundamentals of Data Management, Analysis, and Interpretation in Quantitative Research’, 2023. doi: 10.1016/j.soncn.2023.151398.

C. Andrade, ‘Understanding the Difference Between Standard Deviation and Standard Error of the Mean, and Knowing When to Use Which’, Indian J. Psychol. Med., vol. 42, no. 4, 2020, doi: 10.1177/0253717620933419.

Y. Chen, A. Li, W. Li, and L. Deng, ‘FB+-tree: A Memory-Optimized B+-tree with Latch-Free Update’, Mar. 2025, [Online]. Available: http://arxiv.org/abs/2503.23397

S. Sun, C. Gao, S. Ballijepalli, and J. Wang, ‘An Evaluation of B-tree Compression Techniques’, VLDB Journal, vol. 35, no. 1, Jan. 2026, doi: 10.1007/s00778-025-00950-8.

B. Lu, J. Ding, E. Lo, U. F. Minhas, and T. Wang, ‘APEX: A High-Performance Learned Index on Persistent Memory’, Dec. 2021, doi: 10.14778/3494124.3494141.

A. K. J. Olivier, ‘Consequences of Violating Database Integrity Rules in Data Management Systems’, Int. J. Comput. Appl., vol. 185, no. 2, 2023, doi: 10.5120/ijca2023922669.

D. Manoharan, ‘Healthcare EDI Transaction Lifecycles Embedded with a Multi-Layer Verification Framework to Ensure Referential Integrity’, 2025. [Online]. Available: https://jisem-journal.com/

V. Yesin, M. Karpinski, M. Yesina, V. Vilihura, and K. Warwas, ‘Ensuring data integrity in databases with the universal basis of relations’, Applied Sciences (Switzerland), vol. 11, no. 18, Sep. 2021, doi: 10.3390/app11188781.

A. U. Tansel, ‘Temporal data modelling and integrity constraints in relational databases*’, International Journal of Computer Mathematics: Computer Systems Theory, vol. 9, no. 1, 2024, doi: 10.1080/23799927.2023.2300083.

S. Cai, K. Chen, M. Liu, X. Liu, Y. Wu, and W. Zheng, ‘Garbage collection and data recovery for N2DB’, Tsinghua Sci. Technol., vol. 27, no. 3, 2022, doi: 10.26599/TST.2021.9010016.




DOI: http://dx.doi.org/10.38101/sisfotek.v16i2.16951

Refbacks

  • There are currently no refbacks.


 

JURNAL SISFOTEK GLOBAL

Organized by: Research Center and Community Development
Published by: Institut Teknologi dan Bisnis Bina Sarana Global
Jl. Aria Santika No.43A, Margasari, Kec. Karawaci, Kota Tangerang, Banten 15114
Phone. +62 552 2727
Email: lppm@global.ac.id

INDEXED BY:

   


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License..
Based on a work at https://journal.global.ac.id/index.php/sisfotek/index.