Need for Document-oriented Databases
Relational databases are used to store and retrieve data. But, with the growth of internet, the number of reads and writes a typical application needed to perform grew rapidly needing scaling. Traditional RDBMSs were hard to scale as SQL operation or transaction spanning multiple nodes doesn’t scale well. Thus, leading to many companies abandoning traditional RDBMSs for “noSQL” data stores which use low cost compute or storage boxes for scaling.
Document-Oriented Databases provide more scalability and functionality as, the system is aware of the stored object structure as, documents can contain varying named attributes of different data types (integers, strings), objects can grouped into collections and the system has a query mechanism to search collections for objects with particular attribute values. Document stores can also partition the data over many machines, replicate data for automatic recovery and persist the data. Examples of document stores are SimpleDB, CouchDB, MongoDB, and Dynamo.
The advantages of using document-oriented database are:
- Documents (i.e. objects) correspond to native data types in many programming languages.
- Embedded documents and arrays reduce need for expensive joins.
- Dynamic schema supports fluent polymorphism.
Document-oriented databases have special characteristics compared to RDBMS as
- Objects stored as documents – Object serialization is in-built hence, no serialization is to be applied.
- Complete object access – Entire objects can be read & written at once without group of inserts or stored procedures.
- Documents are atomic – Documents are independent of each other thus, improving performance and decreasing concurrency side effects.
- Standardized Data Layout – Documents are usually described by standardized JSON or XML which are self-describing.
- Schema Independence – Documents being schema free provides flexibility for evolving system without forcing the existing data to be restructured.
Key Features of MongoDB
High Performance – MongoDB provides high performance data persistence. In particular,
- Support for embedded data models reduces I/O activity on database system.
- Indexes support faster queries and can include keys from embedded documents and arrays.
High Availability – To provide high availability, MongoDB’s replication facility, called replica sets, provide
- Automatic Failover.
- Data Redundancy.
A replica set is a group of MongoDB servers that maintain the same data set, providing redundancy and increasing data availability.
Automatic Scaling – MongoDB provides horizontal scalability as part of its core functionality.
- Automatic sharding distributes data across a cluster of machines.
- Replica sets can provide eventually-consistent reads for low-latency high throughput deployments.
Apply for MongoDB Certification Now!!
https://www.vskills.in/certification/databases/mongodb-server-administrator