For starters, MongoDB is the so-called document repository. A key feature of this concept is the preservation of dynamic diagram documents:
- Each entry in a document collection may have a different structure.
- The types of each entry may be different.
- Document properties (columns) can have nested structures
This is not a circuit-free, this is a dynamic circuit (or flexible circuit). To familiarize yourself with the concept, you can find a great tutorial here: https://docs.mongodb.org/manual/data-modeling/
MongoDB is the most widely used document repository - see http://db-engines.com/en/system/MongoDB .
It has βdriversβ for most programming languages, which allows it to develop rapidly. You can quickly dive into Mongo, there are many textbooks and the official Mongo University - an excellent course for developers and database administrators.
In the shortest possible time, it supports indexing, aggregation, filters, load balancing, shards, replications (sets of replicas), etc. Data is saved and transmitted in BSON format ( <a2> ).
A good comparison of MongoDB and RDBMS concepts can be found in this official link: https://docs.mongodb.org/manual/reference/sql-comparison/
What is this good for? It provides agile development where the layout can change over time, especially form-based data, user-generated content, location data, user profiles, and more. It also allows you to store large documents (up to 16 MB each).
Elasticsearch is now not a database. This is a search engine with some great aggregation capabilities ( https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html - make sure you check the Metrics, Buckets and Pipeline aggregates).
Typical RDBSM is not intended for full-text search or loosely structured data. Queries in ES can return results much faster than any database (for example, seconds in an RDBMS compared to milliseconds in ES). You must remember that the key is to design indexes well and that they will occupy your disk space.
There is a very detailed article comparing both performance and utility: http://blog.quarkslab.com/mongodb-vs-elasticsearch-the-quest-of-the-holy-performances.html .
In fact, you can use both options - MongoDB will store your data, where ES will be used as a service level (search, clusters, etc.).