Category Archives: MongoDB

Introduction Despite the traditional relational DB world, there’s also a trend for NoSQL. The NoSQL databases that enable storing unstructured and heterogeneous data. The scalability features have risen it’s popularity to a greater extent in the current market. Horizontal scaling … Continue reading →

MongoDB is Object-Oriented, simple, dynamic and scalable NoSQL database. It is based on the NoSQL document store model, in which data objects are stored as separate documents inside a collection instead of storing the data into columns and rows of … Continue reading →

This post demonstrates the methods of PIT recovery of the database. The step by step details of the recovery process is explained below The requirement for PIT restore/recovery is to setup a single node replica so that the oplogs can … Continue reading →

In MongoDB,the limit() method is used to limit the result set to be returned. You can also use this with various methods such as sort() and skip() for various combination of requirement. The MS SQL equivalent is TOP function >SELECT TOP 10 * … Continue reading →

In MongoDB we have to use either insert() or save() method to add the document to a collection Insert Single document > db.employee.insert( { “employee_id”:1101, “name”:”Prashanth”, “sal”:90000, “dob”: new Date(1983,2,3,5,20), “department”: [ ‘DB Amdin’,’DB Developer’ ], “Location”:”New York” }); Insert Multiple document – We have to use … Continue reading →

The function getDBs() function returns all the database list db.getMongo().getDBs() The runCommand is a special type of query called a database command and its is used database administration. The listDatabases parameter provides a list of all existing databases. You can see all commands … Continue reading →