Advantage of MongoDB
In MongoDB there is no concept of the relationship while RDBMS has a typical schema design that shows all tables and the relationship between these tables. On enterprise level relational database face more difficulty due to accessing of records, performance etc. Below I am trying to explain the advantage of MongoDB over RDBMS.
Advantages of MongoDB in excess of RDBMS
- Schema-less: A collection can hold more than one document with different structure means a number of fields, content size of the document can be different to one another. See below pic.
A person is a collection which has two documents with different structure first document did not have field middleName while second have.
- It has cleared Structure of a single object.
- No complex joins
- Deep query-ability: MongoDB supports dynamic queries on documents using a document-based query language that's nearly as powerful as SQL
- Ease of scale-out: MongoDB is easy to scale
- Conversion / mapping of application objects to database objects not needed
- Uses internal memory for storing the (windowed) working set, enabling faster access to data
- No schema migrations: Since MongoDB is schema-free, your code defines your schema.
Why should use MongoDB
- Document Oriented Storage: Data is stored in the form of JSON style documents
- Index on any attribute
- Replication & High Availability
- Rich Queries
- Fast In-Place Updates
Where should use MongoDB?
- Big Data
- Content Management and Delivery
- Mobile and Social Infrastructure
- User Data Management
- Data Hub