<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>The Creation of ScalableTools for Solving Big Data Analysis Problems Based on the MongoDBDatabase</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>O I Vasilchuk</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A A Nechitaylo</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>D L Savenkov</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>K S Vasilchuk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Research University of Electronic Technology (MIET)</institution>
          ,
          <addr-line>Shokin Square 1</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Samara National Research University</institution>
          ,
          <addr-line>Moskovskoye shosse 34, Samara, Russia, 443086</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Samara State University of Economics</institution>
          ,
          <addr-line>Sovetskoi Armii st. 141, Samara, Russia, 443090</addr-line>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Volga Region State University of Service</institution>
          ,
          <addr-line>Gagarin st. 4, Togliatti, Russia, 445677</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>415</fpage>
      <lpage>423</lpage>
      <abstract>
        <p>This article presents analyze of using MongoDB database to storing aned ective data mining from open networskources. This paper attempts to use NoSQL insteoafd traditional SQL database in systems with strongly related information, comparing to relational and non relational approach in the performance and architecture.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Modern data storage technologies provided a practical opportunity to accumulate huge amounts
of information, which allowed a qualitative change in the attitude to the results of analysis
of stored information. It became possible to move from a descriptive process of analyzing
the results obtained over a certain period of time to predictive data processing technologies
that make it possible to o er valid recommendations for the future. The using of relational
databases (MySQL, PostgreSQL, Oracle Database and others) to solve large data storage
problems becomes problematic. The main advantage of relational databases is the availability
of techniques for maintaining data integrity, achieved by storing links between data elements.
However, the storage and validation of these links require additional time resources, which, with
signi cant amounts and poor data structure, makes the use of relational databases di cult in
some real-time systems.</p>
      <p>As an alternative, there is a NoSQL database. One of the advantages of these databases in
alternative storage formats and the links between them.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Alternative Data Storage for Uni ed Text Formats</title>
      <sec id="sec-2-1">
        <title>2.1. The Problem Formulation</title>
        <p>
          With the development of metaprogramming, the concept of re ection developed { the ability
of the program to use and modify its structure[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Re ection, in the context of object-oriented
programming, spread the technique where objects created by programs, based on knowledge of
the structure of a class, are serialized into representations of given formats[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. Most often this
technique is used in the context of web programming when data is serialized to xml, json and
other formats for text data transmission.
        </p>
        <p>
          This led to the task of ltering such data across di erent data elds of text formats, including
using standard lters (for example, XPath[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]).
        </p>
        <p>
          A common problem is the problem of data storage, the nal form of which is some uni ed
format (hereinafter referred to as UF)[
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. Since a web application user (usually a client
application) works only with UF, and internal data views are not available for it, the lters
available to the client are reduced to UF elds.
        </p>
        <p>
          In classical relational databases, storing such formats is associated with the creation of several
linked tables and subsequent cross queries [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. To speed up such queries, indexes are created
for the corresponding keys.
        </p>
        <p>Consider an example of a web service that provides access to the UF type JSON for some
class "book":</p>
        <p>Consider de nition of scheme for UF:</p>
        <sec id="sec-2-1-1">
          <title>Listing 1: UF de nition in JSON format.</title>
          <p>We assume that most often the book is ltered by title. And we assume that sometimes
we just want to nd a book, for example, for a search function on a web site, and sometimes
download a page with a book where besides the book and its description we also want to display
all the comments.</p>
          <p>It is common practice in the relational database to compile the following schema 1.</p>
          <p>MongoDB uses JSON-like format to keep data and can keep data in the output view.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Object-Relational mapping advantages</title>
        <p>ORM or Object-Relational mapping is a programming technique designed to map database
relations with object-oriented programming languages entities. It creates virtual objects
database inside speci c language representation.</p>
        <p>The main the goal of technique is get rid of the need to write SQL queries to access database
data. The dual way of data representation, relation and object-oriented, usually requires from
programmers to write code for getting data from database in relation way, after transforming
it to object-oriented, and transform back to relation data to safe changes. Relational databases
operate over sets of tables with simple data representations, it leads to use SQL "JOIN"
operation to get full object information. Since relational database management systems usually
do not implement a relational representation of the physical link layer, the execution of several
consecutive queries (referring to one "object-oriented" data structure) can be too expensive.</p>
        <p>
          Relational database management systems work with good performance with global queries,
a ecting a large area of memory, but object-oriented access is more e ective in the work
with small amount of data, as it reduces semantic gap between the object and relational data
representation[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>Two way of data representation increases the complexity of object-oriented code to work with
relational databases, it becomes more prone to errors.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Object-Relational mapping disadvantages</title>
        <p>The most common problem with ORM as an abstraction over SQL is that it can't fully abstract
realization details. Some of the program realizations of ORM works as SQL code generations
tools, some of them do not use SQL equivalents at the external level.</p>
        <p>The reason why abstraction make sense is simpli cation of code writing, but if you use ORM
framework with knowing SQL as a requirement, it doubles programmers e ort, for example the
popular ORM framework Hibernate use HQL language SQL for complex requests, which is very
semantically close to SQL. It brakes uniformity of the code abstraction when programmer needs
a speci c union of data processing.</p>
        <p>Ine ciency is another common problem of ORM. If programmer need extract object data
from relation database, ORM cannot know which of the object property are going to be used
or changed, so it forced to extract all, it cause many requests instead few. The lack of context
sensitivity means that ORM can't consolidate requests, which leads to the impossibility of data
caching or other compensation mechanisms.</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.4. Object-Document mapping</title>
        <p>ODM or Object-Document mapping is an alternative for ORM in document-oriented databases.
The basic idea of ODM frameworks is the same, match data to the object, but we have few
di erences here.</p>
        <p>Firstly, in ORM we should complete data for the object, and complete data for backward
mapping inside database. In ODM there is no requirement for fully completeness of data. The
document can be mapped partly to a database, without multiple table changing.</p>
        <p>Secondly, ODM can make data mapping independently from the data source. It makes easier
to operate over data in a program.</p>
      </sec>
      <sec id="sec-2-5">
        <title>2.5. NoSQL databases</title>
        <p>
          Relation databases usually based on ACID { Atomicity, Consistency, Isolation, Durability[
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
ACID is common requirement for transaction systems.
        </p>
        <p>NoSQL databases usually based on BASE:
basic availability { every request will be completed (successfully or not)
soft state { The system state can be changed without any data changes due to data
consistency
eventual consistency { The data can be inconsistent for some time but will be consistent
after a while.</p>
        <p>It's obviously that NoSQL databases can not be used in any application. Some application
are requires for transaction systems (like banking, ecommerce, etc), but at the same time usual
ACID system doesn't suit for systems based on large data storages, like amazon.com and other.
So NoSQL databases sacri ce data consistent to make more scalable system, to operate over
large amount of data.</p>
        <p>Also, NoSQL databases represent following features:</p>
        <sec id="sec-2-5-1">
          <title>Application of various types of storage facilities. Ability to develop a database without specifying schemas. Linear scalability (adding CPUs increases performance). Innovation: A lot of opportunities for data storage and processing</title>
        </sec>
      </sec>
      <sec id="sec-2-6">
        <title>2.6. NoSQL databases common types</title>
        <p>Unlike relation databases, NoSQL databases have various data schemas, implemented through
the use di erent data structures.</p>
        <p>Depending on the data schema and the approaches to distribution and replication, four types
of storage can be distinguished: key-value store, document store, column database stores, graph
databases.</p>
        <p>Key-value storage</p>
        <p>
          The key-value store is the simplest data store that uses the key to access the value. Such
repositories are used to store media images, create speci c le systems, as caches for objects,
as systems well scalable by design. Examples of such storage facilities are Berkeley DB,
MemcacheDB, Redis, Riak, Amazon DynamoDB [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <p>Bigtable-like databases (column database stores)</p>
        <p>In this store, data is stored as a sparse matrix, the rows and columns of which are used as
keys. A typical application of this type of database is web indexing, as well as tasks related to
large data, with reduced requirements for data consistency. Examples of databases of this type
are: Apache HBase, Apache Cassandra, Apache Accumulo, Hypertable, SimpleDB.</p>
        <p>Column family stores and document-based repositories have similar usage scenarios: content
management systems, blogs, event logging. The use of timestamp allows using this type of
storage for the organization of counters, as well as the registration and processing of various
data related to time.</p>
        <p>
          The family column stores should not be confused with column stores. The latter are relational
databases with separate storage of columns (in contrast to the more traditional line-by-line data
storage)[
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>Document-based database management system</p>
        <p>Document-oriented databases serve to store hierarchical data structures. They are used in
content management systems, publishing, document search, and so on. Examples of this type
of database are CouchDB, Couchbase, MarkLogic, MongoDB, eXist, Berkeley DB XML.</p>
        <p>
          Databases based on graphs Graph databases are used for tasks in which data has a large
number of links, for example, social networks, fraud detection. Examples: Neo4j, OrientDB,
AllegroGraph, Blazegraph, In niteGraph, FlockDB, Titan [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>Since the edges of a graph are materialized, that is, they are stored, traversing the graph
does not require additional computation (like JOIN in SQL), but to nd the initial vertex of
the traversal requires the presence of indices. Graphical databases generally support ACID, and
also have di erent query languages, like Gremlin and Cypher (Neo4j).</p>
      </sec>
      <sec id="sec-2-7">
        <title>2.7. Motivation for MongoDB</title>
        <p>As an alternative to the classical approach, there are NoSQL databases. For tasks in which UF
is involved, the most common use of document-based one.</p>
        <p>It has following advantages:</p>
        <p>It works with unstructured data, which make possible to add new data eld with no
additional cost.</p>
        <p>It available to compromise nding in performance-reliability.</p>
        <p>
          Working with ODM frameworks (Object-Document mapping) { alternative for ORM
[
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. In cases of optional data it makes possible to map object without cross queries, make
the mapping operation faster.
        </p>
        <p>The JavaScript support on server side.</p>
        <p>
          As a working example, the authors used MongoDB. This choice is due to prevalence and
testing in high load projects[
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
        <p>
          Based on benchmarking top NoSQL databases performance tests conducted by "End Point
Corporation", the authors systematized MongoDB performance indicators f or various hardware
con gurations, which were summarized in the table 1[
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
        </p>
        <p>The performance comparison experiment was conducted in the cloud services of "Amazon
Web Services EC2", which provides an industrial platform for systems that require a horizontal
extension of the architecture, such as distributed non-relational databases. In order to minimize
the errors in measurements related to the current load of "Amazon Web Services EC2" services,
each set of test scenarios was played three times, at least 24 hours apart, using newly created
clusters with hardware con gurations described in the table 2 of hardware con gurations of
cloud services "Amazon Web Services EC2":</p>
        <p>
          As an operating system in the nodes used Ubuntu 14.04 LTS AMI in the HVM mode (virtual
hardware virtual machine) virtualization, customized with Oracle Java 7. For each test, an
empty database was used as the starting point. The client applications were programmed
to enter randomly generated information into the database. After the database was nally
populated, each of the test scenarios was executed sequentially. All clients performed requests
in parallel, and then waited for all operations to be performed and the corresponding results
obtained. The client software was supplemented by the installation of the YCSB free software
package designed to analyze the performance of NoSQL databases[
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. The study of the company
"End Point Corporation" allows you to determine the number of necessary nodes for placing
MongoDB in the solution of certain business tasks, based on the anticipated load, when using
a SSD drive in each machine-node. Nevertheless, despite its obvious competitive advantages,
such as small size and weight, as well as the number of random IOPS that exceed by an order
of magnitude the more common HDDs, the SSD is inferior to the latter by cost[
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-8">
        <title>2.8. Preconditions</title>
        <p>The SQL database with 5 millions entries for book instance and 10 millions for comments (two
for each book entry) was used. And 5 millions entries for full (with comments inside view, also
two comments on each book) book instance was used in MongoDB collection.</p>
        <p>Three main scenarios were examined:</p>
        <sec id="sec-2-8-1">
          <title>Find by title</title>
          <p>Find by comment</p>
          <p>Find comments for the book</p>
          <p>Since MongoDB stores the data immediately in the nal UF view, it will be absolutely
identical for searching the book and requesting an extended output.</p>
          <p>Averaged values over 10 experiments are used to except the non-deterministic in uence of
external factors.</p>
        </sec>
      </sec>
      <sec id="sec-2-9">
        <title>2.9. Results</title>
        <p>As can be seen from the results(Figure 3 and Table 3) of the research, the search query
in the collection of the MongoBD is more e ective than the search in the MySQL. The most
e ective scenario is to search for comments on the book, that is, additional information related
to the main entity. The speed of work of MongoDB in this case surpasses MySQL almost
5 times. Nevertheless, it is important to understand that if the search target is additional
information(comments here), the velocity of the query for MongoDB will be greatly worse then
traditional relational databases.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Conclusion</title>
      <p>The conducted research allowed to draw a conclusion about the expediency of using
documentoriented databases for storing large amounts of data for indexing purposes with a small number
of supported links or their absence. Feasibility is con rmed by the fact that the use of
documentoriented databases for storing large amounts of data for indexing with a small number of
supported links or their absence allows you to select the optimal con gurations of computing
systems in the framework of current and future business tasks, with the possibility of horizontal
and vertical scaling, in conditions better performance than relational equivalents.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Kiczales G J d</surname>
            <given-names>R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bobrow D G 19T91he</surname>
          </string-name>
          <article-title>Art of the Metaobject Protocol (</article-title>
          MIT Press)
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>JavaScript</given-names>
            <surname>Re ect Global</surname>
          </string-name>
          <article-title>Object (Access mode: https://developer</article-title>
          .mozilla.org/en-US/docs/ Web/JavaScript/Reference/GlobalObjects/Re ect) (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>[3] XPath 3.1 Speci cation (Access mode: https://www</article-title>
          .w3.org/TR/xpath-31/) (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Bell</surname>
            <given-names>C 2012</given-names>
          </string-name>
          <string-name>
            <surname>Expert MySQL (APress)</surname>
          </string-name>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Protsenko</surname>
            <given-names>V I</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kazanskiy N L and Serafimovich P G C2o0m1p5uter Optics</surname>
          </string-name>
          <article-title>39(4</article-title>
          )
          <fpage>582</fpage>
          -
          <lpage>591</lpage>
          DOI: 10.18287/
          <fpage>0134</fpage>
          -2452-2015-39-4-
          <fpage>582</fpage>
          -591
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Loureno</surname>
            <given-names>J R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabral B anCdarreiro P 2015</surname>
          </string-name>
          <article-title>Choosing the right nosql database for the job: a quality attribute evaluation</article-title>
          <source>Journal Of Big Data 2 18</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Lake</surname>
            <given-names>P</given-names>
          </string-name>
          and
          <string-name>
            <surname>Crowther P 2013 Nosql databases Concise</surname>
          </string-name>
          Guide to Databases Undergraduate Topics in Computer Science DOI:
          <volume>10</volume>
          .1007/97814471560175
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Kazanskiy</surname>
            <given-names>N L</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Protsenko</surname>
            <given-names>V I</given-names>
          </string-name>
          and
          <string-name>
            <surname>Serafimovich P G 2014 Computer Optics</surname>
          </string-name>
          <article-title>38(4</article-title>
          )
          <fpage>804</fpage>
          -
          <lpage>810</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Singh</surname>
            <given-names>M</given-names>
          </string-name>
          and
          <article-title>Kaur</article-title>
          K 201S5ql2neo:
          <article-title>Moving health-care data from relational to graph databases IEEE</article-title>
          <source>International Advance Computing Conference 7154801</source>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Kazanskiy</surname>
            <given-names>N L</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Protsenko</surname>
            <given-names>V I</given-names>
          </string-name>
          and
          <string-name>
            <surname>Serafimovich P G P2r0o1c7edia</surname>
          </string-name>
          <article-title>Engineering 201</article-title>
          817 DOI: 10.1016/j.proeng.
          <year>2017</year>
          .
          <volume>09</volume>
          .602
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Richardson</surname>
            <given-names>L</given-names>
          </string-name>
          and
          <string-name>
            <surname>Ruby S 2007 RESTful Web Services (Beijing: O'Reilly)</surname>
          </string-name>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <article-title>MongoDB O cial site (Access mode: https://www</article-title>
          .mongodb.
          <source>org)</source>
          (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Benchmarking NoSQL Top Databases</surname>
          </string-name>
          (Access mode:https://www.datastax.com/wp-content/ themes/datastax-2014-08/files/NoSQL Benchmarks EndPoint.pdf) (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <article-title>Yahoo! Cloud System Benchmark (Access mode: https://github</article-title>
          .com/joshwilliams/YCSB) (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Amazon EC2</surname>
          </string-name>
          <article-title>InstanceTypes (Access mode:https://aws</article-title>
          .amazon.com/ru/ec2/instance-types/) (
          <volume>18</volume>
          .
          <fpage>10</fpage>
          .
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>