Comparative Studyof Database Toolsfor Android Applicationcamerareadyfinal
Comparative Studyof Database Toolsfor Android Applicationcamerareadyfinal
Abstract
The database is the backbone of any software application. The prominent performance of the Database
is a significant factor in the development and efficient execution of android applications. Some
android apps need rapid input response, other processes much information, and without the support of
an efficient database management system, this is nearly incomprehensible. While talking about mobile
devices, then offline or local databases came into the picture. In this paper, the main focus is to
compare the performance of available offline tools/libraries which are SQLite, Room Persistence
Library, and ObjectBox in different scenarios. Firstly, perform CRUD operations on all three
databases and calculate time in seconds and compare the time of each operation. Secondly, calculate
the size of each database in MB. For this comparison, an android application has been developed to
test the performance and efficiency of each tool. The evaluation results show that the Object Box
library's performance is very well in terms of Create, Update, and Delete operations, and in Read
operation, whereas the SQLite is better than the other two. In terms of size Room Persistence Library
and SQLite, both are good than ObjectBox.
Keywords: Android, database, SQLite, Room Persistence Library, Object Box, CRUD, Performance
1. Introduction phones
solution on Android to store information on the solution for repeated and structured data for
device. Saving data in a database is an ideal
offline usage. However, most of the time, the increments in both classified and non-classified
developer community does not know which operations. N.Leavitt [6] discusses a brief
database library will be best according to their history of SQL and NoSQL databases close by
application requirements. the contrasts between them. He noticed that
The main goal of paper deals with the analysis SQL and NoSQL databases are complementary
of the performance of these three database since they are intended to overcome various
libraries in terms of most basic CRUD types of issues. N.Obradovic, A.Kelec and I.
operations, as well as in terms of memory size. Dujlovic [7] did a performance analysis of the
This comparison will help developers to Android SQLite database. Their study's primary
choose the best database library to increase the goal is to investigate the performance of the
performance of their apps. Section 2 focuses on SQLite database in different scenarios, such as
the literature review and research to deal with performing CRUD operations on encrypted or
databases and performance impacts. Section 3 unencrypted data. Further, they discuss
gives a brief overview of database libraries. simultaneous access to the database.
Section 4 describes the method and procedure.
This section also introduces an application,
called DBToolInspector, which performs 3. Overview of Selected Database
testing and performance measurement and tools
conducts results. Performance tests and their
results are discussed in section 5. 3.1 SQLite
SQLite is an open-source SQL database that
stores data to a text file on a device. Android
2. Literature Review
comes in with built-in SQLite database
Prior studies have been found that there are implementation. SQLite is the most used
many research work is available for database database engine in the world. [8]
comparison. A.Gupta, S.Tyagi, N.Panwar and S.
Sachdeva [3] did a crucial study and compared 3.2 Room Persistence Library
different types of NoSQL Databases based on Room is an ORM, Object Relational Mapping
functional and non-functional features.Four Library, which provides an abstraction layer
major classifications of the NoSQL database are over SQLite to allow easy database access. It is
graph databases, document stores, key-value a part of Android Jetpack and created By
stores, and wide column stores. Then for Google Developers.
additional investigation, one database is chosen
from everyone and is contrasted with their data 3.3 ObjectBox
model, CAP theorem, distributive properties,
ObjectBox is a super-fast database and
and other factors. A.Talha KABAKUŞ [4] did a
synchronization solution, built uniquely for
performance comparison of two widely used
Mobile and IoT devices [9], and created by
android databases, SQLite and Firebase. For this
GreenRobot.
comparison, he develops an android application
to execute common CRUD operation, and
experimental results indicate that SQLite has 4. Methods and Procedure
better performance than Firebase except in
delete operation. Benchmarking of these databases tools
S.Agarwal and K.Rajan [5] compare an SQL performance is very complicated because it
database (PostGIS) with a NoSQL database depends on different parameters ,such as device
(MongoDB) for spatial and aggregate queries. hardware ,OS version,file system and alse the
The tests they evaluate show that the NoSQL dataset.Therefore this paper is not focus on
database gives better execution by a normal external factors and datasets but focused on
factor of 10x-25x which increments database operations.These test cases have been
exponentially when the number of information conducted on real device Oppo A5s whose
3
5.2 Read
Fig.4 shows that when we are reading data, the
SQLite is incomparably faster than the other
DB systems. Room and ObjectBox take more
time than SQLite.
Fig. 1. Working flow of the app
4
5.3 Update
When updating database information, again, 5.5 Size
ObjectBox has beaten SQLite, and SQLite has Comparing the presented systems, attention
the worst result, and Room Persistence Library should be paid to the memory used by the
has satisfactory results. The results can be databases. In this case, the worst is Object Box,
observed in Fig.5. whose database size is 40.48 MB. Room
Persistence Library and SQLite have achieved
almost the same results as shown in Fig. 7.
both SQLite and Room Persistence Library have [6] S.Agarwal and K.Rajan “Analyzing the
satisfactory results. performance of NoSQL vs. SQL databases
As the next step in research, our goal is to for Spatial and Aggregate queries,” Free
conduct more complex operations such as add and Open Source Software for Geospatial
more tables, perform joins and subqueries on (FOSS4G), Vol.17, Article 4,2017.
that data, and then compare results. However,
this does not mean that the result will be the [7] N.Leavitt, “Will NoSQL Databases Live
same for complex queries. Up to Their Promise? “Computer, 2010.