Brief description

MongoDB is written in C document-oriented NoSQL database management system open source, does not require the description of the table schema (schemaless).

MongoDB has the following levels of reporting:

  1. The document is a JSON object with an arbitrary number of fields. Fields can store both proste value to voennye objects and arrays.
  2. Collection (table)- the same type documents are stored in separate collections. The documents in the collection can be proindeksirovany. Access dokumentu possible by key and value fields.
  3. Database - a set of collections.

Support MongoDB is implemented for most programming languages:

  • C;
  • C ;
  • C#;
  • Java;
  • Node.js;
  • Perl;
  • PHP;
  • Python;
  • Ruby;
  • Scala.

Differences MongoDB from relational databases:

  • Not supported TransAsia. Atomicity is guaranteed only at the level of the whole document, that is, a partial document updates cannot occur. The absence of a mechanism of isolation» qmo. Any data that is read by the same client in parallel, which can be changed by another client.

The benefits of MongoDB relational database before:

  • Supports horizontal scaling with replication data. Data can be stored on an arbitrary number of servers. Replication provides fault-tolerance support functions at the output nodes of the system.
  • Data storage format (document) is close to the format of data representation in programming languages (objects) does not require complex and expensive queries to get the desired object.
  • Support operations for MapReduce massively parallel data processing.



Laboratory work and practical tasks

To install mongoDB the easiest to use docker image with MongoDB.

Start the server by the command:

docker run --name mongodb -p 27017:27017 -d mongo

To work with the mongo server in containere it is recommended to run within the running container mongo-shell command:

docker exec -it mongodb mongo

As practical tasks for laboratory work you can use of the Task for the laboratory work 5 MongoDB. On this page is given as link to the test dataset, and a list of tasks for you to perform operations on these data sets.


Examples of the CRUD and aggregation operations specified in the previous section, data sets, please see pages:

Opportunities for certification