MongoDB

Topics related to MongoDB:

Getting started with MongoDB

Pluggable Storage Engines

In MongoDB 3.0, MMAP (default) and WiredTiger are the stable storage engines. Usually, if your app is read-heavy, use MMAP. If its write-heavy, use WiredTiger.

Your solution may also have a mixed replica set members where you can have one node configured with MMAP and another with WiredTiger. You can use one to insert massive data and the other to read with analytical tools.

After MongoDB 3.2, WiredTiger becomes the default engine.

CRUD Operation

Updating and Deleting a document should be done carefully. Since operation may affect for multiple documents.

Aggregation

Aggregation framework in MongoDB is used to achieve common GROUP BY functionality of SQL.

Consider the following insertions in collection named transactions for every example.

> db.transactions.insert({ cr_dr : "D", amount : 100, fee : 2});
> db.transactions.insert({ cr_dr : "C", amount : 100, fee : 2});
> db.transactions.insert({ cr_dr : "C", amount : 10,  fee : 2});
> db.transactions.insert({ cr_dr : "D", amount : 100, fee : 4});
> db.transactions.insert({ cr_dr : "D", amount : 10,  fee : 2});
> db.transactions.insert({ cr_dr : "C", amount : 10,  fee : 4});
> db.transactions.insert({ cr_dr : "D", amount : 100, fee : 2});

Indexes

Performance Impact: Note that indexes improve read performances, but can have bad impact on write performance, as inserting a document requires updating all indexes.

Update Operators

Configuration

Replication

Bulk Operations

Constructing a list of write operations to perform in bulk for a single collection.

Java Driver

Backing up and Restoring Data

Getting database information

Backing up and Restoring Data

Mongo as a Replica Set

2dsphere Index

Mongo as a Replica Set

Mongo as Shards

MongoDB Aggregation

Managing MongoDB

Python Driver

Authentication Mechanisms in MongoDB

MongoDB Authorization Model

Querying for Data ( Getting Started )

MongoDB - Configure a ReplicaSet to support TLS/SSL

Collections

Create Database

Upgrading MongoDB version

If you have an older version of MongoDB, you must upgrade the whole path to the newest version. For example, if you are running version 3.0 and want to get version 3.4, you must upgrade 3.0->3.2->3.4.

Upserts and Inserts