An analysis of the state of the security of the most popular open-source databases,
representing both the relational and NoSQL databases, is described, and includes
MongoDB and MySQL. From a security point of view, both these databases need to
be properly configured so as to significantly reduce the risks of data exposure and
intrusion.
Between MongoDB and MySQL, several comparisons exist in the literature, most
of them focusing on a comparison with relational MySQL, and not with
document-based MySQL; for example, a login system project developed using Python
programming language was used to analyze the performance of MongoDB and
relational MySQL, based on the data-fetching speed from databases. This paper
performed an analysis of the two databases to decide which type of database was
more suitable for a login-based system. The paper presented presents information on
the upsides of the NoSQL databases over the relational databases during the
investigation of Big Data, by making a performance comparison of various queries
and commands in the MongoDB and relational MySQL. Additionally, the concepts of
NoSQL and the relational databases, together with their limitations. Consequently,
despite the fact that MongoDB has been approached in many scientific papers, to our
knowledge, at the time of writing this paper, no paper has focused directly on
comparing it with the document-based MySQL.
4. Method and Testing Architecture
For each database considered, an application was created in Java using IntelliJ
IDEA Community Edition (4 February 2020), which aims to develop a server for the
processing and storage of data on the frontend. When creating the testing architecture
setup, it was considered that it is very important to test the types of databases that
exactly fit the criteria that are imposed in an application that is similar to the one to be
developed, and not just by using their tools; such as for MongoDB, the MongoDB
web interface, or the Mongo shell, because there are differences, both in how to use
them and with regard to the response times, which if tested directly may seem easy
and fast, but in practice itself are found to be slower or more difficult to achieve.
The two applications are identical in terms of structure, with both containing the
objects that we need and a service class for each object, annotated with @Service. In
addition to these classes, each application contains a class within which there is a cron
(a process by which a method can be called automatically and repeatedly at a range
set by us, taking as a parameter a string that is composed of six digits separated by a