/  MongoDB Tutorial


MongoDB is one of the Top NoSQL databases which is an Open-source and a document oriented database that is being widely used now. MongoDB stores the data in JSON type of documents. In this MongoDB tutorial, we will discuss both development and administration too.

Wikipedia says

MongoDB (from humongous) is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc., and is published under a combination of the GNU Affero General Public License and the Apache License

MongoDB is a distributed Database at its core, so high availability, horizontal scaling, and geographic distribution are built in and easy to use. It’s one of the best databases in terms of developer productivity.

Let’s quickly learn MongoDB and explore!!!

Understanding RDBMS vs NoSQL:

NoSQL databases differ from RDBMS technology in four main areas. i.e Data Model, Data Structure, Scaling, Usage Cost.NoSql database implementation is easy and typically uses cheap servers to explod the data whereas, RDBMS databases are expensive and it uses big servers and storage systems.Learn more..

How to install MogoDB?

This installation guide will be useful for installing MongoDB on Linux (RHEL). Once after the Linux host is ready with an internet connection, below is the process of installation.MongoDB 3.2 deprecates the support for RHEL 5. Learn more..

How to uninstall MongoDB?

Stop the mongod process by issuing the following command: sudo service mongod stop. Remove Packages. Remove any MongoDB packages that you had previously installed. Check the status MongoDB server and finally Remove Database and log Directories. Learn more..

How to create Data model in MongoDB?

MongoDB make data survive in flexible schema model. In RDBMS, it is must to create table’s schema before inserting data, but here in Mongodb Collections dontenfore document structure. Learn more..

How to create Data base in MongoDB?

Database in MongoDB is nothing but a logical storage of all collections created. A mongoDB server can have multiple databases.By Default, when we install the mongoDB we will have 2 databases. To check the databases below is the command. Learn more..

How to Drop Database by using MongoDB?

We can drop a database in mongoDB along with the associated datafiles.But this will not delete the associate users in that database in version 2.6. To drop those users, we need to use dropAllUsersFromDatabase command.Check the database you want to delete. Learn more..

How to create collections using MongoDB?

In mongoDB, Collection is nothing but a container of all documents.It is almost equivalent to table in RDBMS which is a combination of rows and columns. We can Create collections by using the below syntax. Learn more..

Understanding drop collection using MongoDB:

In this tutorial, we will learn about how to drop a collection in MongoDB.The method also removes any indexes associated with the dropped collection. In mongoDB, we can drop collections by using the below syntax. Learn more..

How to insert Document in MongoDB?

In MongoDB, Document is nothing but a key-value pairs .It provides the insert() method (and two others) for adding documents to a database. you can use the below commands to insert a document into a collection. Learn more..

How to update Document in MongoDB?

In MongoDB, updating a document can be done through below provided methods.This command will update a single document even though the filter or condition have multiple document that may match to update. Learn more..

How to Delete Document in MongoDB?

In MongoDB, deleting a document can be done through below provided methods.This command will delete a single document even though the filter or condition have multiple document that may match to update. Learn more..

How to Select Document in MongoDB?

In MongoDB, we can retrieve all documents in a collection by using the below command. This will retrieve all the documents with in the collection.You can use several other methods and conditions while retrieving the documents in a collection as per the requirement. Learn more..

Understanding create index in MongoDB:

Collections with millions of documents with no indexes will result in poor performance of filtering queries based on query criteria. Using indexes will ensure the efficient way of executing the Queries in a database. Learn more..

Understanding Drop index in MongoDB:

In MongoDB, we can remove the index by using the command below. We need to provide the required fields on which the indexes need to be removed.First verify the indexes already created in a collection. Learn more..

How operators perform in MongoDB?

In this tutorial ou will learn, operator performs a logical and operation on an array of two or more expressions and retrieves the documents which satisfy all the expressions in the array. Query operators provide ways to locate data within the database and projection operators modify how data is presented. Learn more..

When & where to use Limit and Sort functions in MongoDB?

In MongoDB you will learn using the Limit modifier, we can limit the number of documents that can be returned in a query.Whereas, by using the sort modifier, we can sort the result in a ascending order or descending order. Learn more..

Understanding Aggregation in MongoDB:

Aggregation is the processing of data records and return the compiled results. It groups the data from multiple documents to return a single result. Learn more..

How to use WiredTiger Storage in MongoDB?

WiredTiger is a storage engine which is introduced from MONGODB 3.0 version for 64-bit and this became default storage engine from MONGODB 3.2. It manages write operations well by controlling document-level concurrency. So that, multiple clients can modify different documents of a collection at same time. Learn more..

How to upgrade MongoDB Versions?

MongoDB versions being maintained by several business applications in the market are with 2.4, 2.6, 3.0, 3.4.First you must have current running version 2.6 to upgrade to 3.0. If you are running the version below 2.6 or if it is 2.4 version you first need to upgrade from 2.4 to 2.6 Learn more..