Skip to content

Category: MongoDB

Rename a collection in MongoDB

Renaming a collection in MongoDB is quite simple. When you rename a collection, it obtains a lock on the collection till the rename process is complete. Syntax Example Here the […]

How to query an array in MongoDB?

In this post you will learn how to query an array in a MongoDB collection. You will also learn how to filter a pattern in an array in a document […]

Pattern matching in MongoDB with regex

In this post, you will learn how to match mongodb documents with a partial value. This is similar to pattern matching using LIKE predicate in SQL. Finding a document in […]

Enable Authentication to MongoDB Database

Using MongoDB without enabling authentication and access control lets anybody view and alter your data. It’s okay to work with MongoDB without access control when you are a novice developer […]