Mongodb backup and restore

database mongodb nosql

Backup and restore are important routine jobs. If you are working with MongoDB then you must know how to take backups as well as how to restore them. MongoDB comes with wonderful command line tools for backup and restore, i.e. mongodump and mongorestore. I will not be explaining all the backup/restore method here; you can refer MongoDB documentation for backup and restore strategies for more insight. But what I am going to show you are, the most common and simple ways to backup and restore MongoDB. Read More…

CRUD operations in Mongodb

database mongodb nosql

The acronym CRUD stands for Create, Read, Update and Delete. In this section, we will learn basic CRUD operations. CRUD operations can be extremely complex sometimes but we will not go into the complex stuff for two reasons. First, it is not under the scope of this chapter. Second, we will be doing a lot of CRUD operations in the following chapters. Before we start learning CRUD, I must tell you that we will be using mongo shell for CRUD in the following sections. Read More…

Indexes in Mongodb

database mongodb nosql

MongoDB provides different kinds of indexes. Indexes are very important when the dataset is big. You just cannot keep scanning whole collection on disk again and again for every query. So, indexing becomes extremely important when you have huge collections. But when you have huge dataset then chances are there that one type of index will not fit for all as the nature of data differs. We must have indexes that match well with the nature of data as well as nature of query. Read More…

Mongodb GridFS using Python

database mongodb nosql

Data is collected and stored in different forms depending on the nature of data. It can be in the form of text, images, videos, audio files and files in other formats. MongoDB can be used for storing all kinds of data, but so far we have used it for storing plain text information in MongoDB documents. As you know by now that MongoDB document has a size limit of 16MB. Though 16MB is good enough in most cases but looks tiny if you think of storing high-resolution images, PDF files, music, videos etc. Read More…