How to Shard in MongoDB

Introduction If you’re working on a production application or are headed in that direction, you’ll need to start worrying about scalability. What happens if you create a social media site that starts going viral and instead of saving 100MB per day you’re now storing 100GB per day. One tool in your MongoDB tool belt will … Continued

How to Save an Image in MongoDB using Java

Introduction MongoDB is widely used to store and manage text data, but its capabilities extend far beyond just text. If you’ve been wondering how to save an image in MongoDB, look no further– it’s actually quite easy to store images and other binary data to MongoDB. In this tutorial, we’ll explain how to use the … Continued

How to Sort in MongoDB Compass Community

Introduction If you’re looking for an easy way to visualize and understand your data, MongoDB Compass Community is a simple solution. MongoDB Compass acts as a GUI for MongoDB, allowing you to navigate through your databases, execute queries and perform various operations. Common database tasks, such as sorting the documents in a collection, can be … Continued

How to Add Fields in a MongoDB Array using Java

Introduction When you’re working with data in MongoDB, it’s likely that you’ll have to add a new field to a document at some point. Fortunately, adding fields in a MongoDB array is a simple task that can be accomplished in just a few lines of code. In this step-by-step tutorial, we’ll show you how to … Continued

How to Setup Replicas using MongoDB – Part 2

Introduction In this two-piece article we are showing step by step how to setup replicas in MongoDB. You might not need replication for development but if you ever want to move your application to a production environment you will need replication. Loss of data is unacceptable by today’s standards. In this article we are setting … Continued

How to Setup Replicas using MongoDB – Part 1

Introduction In this article we’ll guide you through how to setup replicas with MongoDB on your local development environment. Today’s technical market is very demanding and losing data is not an option for any production application. If one of your database servers goes down you want multiple replicas with the same data to take over … Continued

How To Access And Parse MongoDB Documents In Python

Introduction If you’re a Python developer and planning to work with MongoDB, it’s important to know how to handle the results of a query. When you query a collection of documents with PyMongo, you’ll receive results in the form of a Python dictionary. It’s actually quite easy to access these MongoDB documents in Python and … Continued

Why you should use Subcollections in MongoDB

Introduction Having an organized database architecture is invaluable. If your data is organized cleanly, it’s easier to read, easier to maintain, and easier to work with in general. One aspect of organizing in MongoDB that we see under-utilized is the use of Subcollections. Subcollections sound slightly intimidating and a lot of developers didn’t even know … Continued

What are the Data Types in MongoDB?

Introduction If you’re working with MongoDB or thinking about using it for your next project or product, one of the first basic questions you’ll ask yourself is “What data types can I store using MongoDB?”. In this article we’ll discuss the available data types and explain the more commonly used ones with enough detail that … Continued

How to Query Arrays in MongoDB

Introduction In this article we’ll be talking about how to query arrays in MongoDB. This is an extremely common practice and you’ll want to have it down cold if you’re working with MongoDB frequently. We’ll go over several examples and scenarios and you should follow along with your own data as much as you can … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.