MongoDB is a source-available cross-platform document-oriented database program. Classified as a No-SQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).
- Ad-hoc queries
MongoDB supports field, range query, and regular-expression searches.
Fields in a MongoDB document can be indexed with primary and secondary indices.
A master can perform Reads and Writes and a Slave copies data from the master and can only be used for reads or back up.
MongoDB can run over multiple servers, balancing the load or duplicating data to keep the system up and running in case of hardware failure. 5.File Storage MongoDB can be used as a file system, called GridFS, with load balancing and data replication features over multiple machines for storing files. GridFS divides a file into parts, or chunks, and stores each of those chunks as a separate document.
MongoDB provides three ways to perform aggregation: the aggregation pipeline, the map-reduce function, and single-purpose aggregation methods.Aggregation Pipeline provides better performance for most aggregation operations.Map-reduce can be used for batch processing of data and aggregation operations.
Purpose of building MongoDB
- High Availability
- Scaling from single server deployments to large, complex multi-site architectures.
- Key points of MongoDB
- Develop Faster
- Deploy Easier
- Scale Bigger
- MongoDB is schema less. It is a document database in which one collection holds different documents.
- There may be difference between number of fields, content and size of the document from one to other.
- Structure of a single object is clear in MongoDB.
- There are no complex joins in MongoDB.
- MongoDB provides the facility of deep query because it supports a powerful dynamic query on documents.
- It is very easy to scale.
- It uses internal memory for storing working sets and this is the reason of its fast access.
Where MongoDB should be used
- Big and complex data
- Mobile and social infrastructure
- Content management and delivery
- User data management
- Data hub