DefinePK hosts the largest index of Pakistani journals, research articles, news headlines, and videos. It also offers chapter-level book search.
Title: UNRAVELING DATABASE CHOICES IN ANDROID STUDIO: A COMPARATIVE ANALYSIS OF SQLITE AND ROOM PERSISTENCE LIBRARY
Authors: Muddasir Abbas,Meer Usman Amjad,Saleem Zubair,Asim Amin,Sabah Arif,Muhammad Abdullah Irfan Khan
Journal: Contemporary Journal of Social Science Review
| Category | From | To |
|---|---|---|
| Y | 2024-10-01 | 2025-12-31 |
Publisher: Frontline Education Research
Country: Pakistan
Year: 2025
Volume: 3
Issue: 1
Language: English
A mobile app heavily relies on user data. If an app doesn't address user inquiries effectively it may struggle to stay competitive in the market. The blame, for this setback lies with the developer. The demand for Android apps is on the rise. This study delves into. Contrasts two database systems. Room Persistence Library. To complement existing research in this area we carried out experiments by setting up both databases and executing queries. We aimed to determine which database is more user-friendly and efficient. This study proves beneficial for developers seeking to make decisions regarding the database for their projects. It offers insights, into how each database operates and responds aiding developers in grasping their functionality and performance levels.
To compare the performance, user-friendliness, and efficiency of SQLite and the Room Persistence Library in Android applications by setting up both databases and executing queries, thereby providing data-driven insights for developers' database selection decisions.
Experimental comparison involving setting up both SQLite and Room Persistence Library databases in an Android Studio environment. Performance was assessed by executing CRUD (Create, Read, Update, Delete) operations and measuring execution times (Min, Max, Mean Time ms). The study was conducted within an MVVM application architecture, and device profiling metrics (Android Version 13, 6.00 GB RAM, Octa Core CPU) were documented.
graph TD; A[Setup SQLite Database] --> C[Execute CRUD Queries on SQLite]; B[Setup Room Persistence Library] --> D[Execute CRUD Queries on Room]; C --> E[Measure SQLite Performance Metrics]; D --> F[Measure Room Performance Metrics]; E --> G[Compare Execution Times, CPU/Memory Usage]; F --> G; G --> H[Analyze Trade-offs: Speed vs. Safety/Abstraction]; H --> I[Formulate Conclusion and Recommendation];
SQLite offers direct control and excellent transaction processing but lacks compile-time safety checks. Room acts as an abstraction layer over SQLite, providing type safety, compile-time query validation, and high-level APIs, which simplifies development and reduces runtime errors, aligning better with modern Android development best practices despite a slight performance overhead in execution time compared to raw SQLite.
For running queries, SQLite performed slightly better than Room due to direct file system interaction, whereas Room's abstraction layer resulted in marginally lower performance. Room is considered the preferred option as it prioritizes user-friendliness, safety during compilation (compile-time query validation), and integration with Android components (MVVM, Live Data). Both databases demonstrated comparable CPU utilization and transaction processing speed in real-world scenarios.
Room is the recommended choice for Android development as it balances convenience, performance, and safety by integrating abstraction layers over SQLite, aligning with Android architecture components. SQLite remains a viable alternative for developers prioritizing absolute control over queries and schemas.
1. The study was published in Volume 03, Issue 01 of the Contemporary Journal of Social Science Review in 2025.
2. The development environment included an Intel(R), Xeon(R), CPU E5-1650 v3 @ 3.50GHz processor with 16.00 GB of RAM.
3. For the 'Delete' operation executed 100 times, SQLite had a Mean Time of 0.5 ms, while Room had a Mean Time of 11 ms.
Loading PDF...
Loading Statistics...