Category: MongoDB

MongoDB with Java: Retrieve and Delete Document

MongoDB with Java: Retrieve and Delete Document In this tutorial we will learn how we can retrieve or fetch data from any document stored in a collection and how to delete any existing document stored in any collection. These functions are equivalent to SELECT and DELETE query in MySQL Retrieve a Document If we want to retrieve data against […]

MongoDB with Java: Updating Document

MongoDB with Java: Updating Document While updating data in document present in any collection of our database, we will come across various scenarios, let us analyze them step by step. Updating a single field value We will update the field name and change its value to ABC. To do so, we will have to first find the correct […]

MongoDB with Java: Inserting Document

MongoDB with Java: Inserting Document We will continue with our collection User for data insertion which we created after connecting with MongoDB database. Let us consider various scenarios for inserting data in our collection User. Inserting Document into Collection with default _id Suppose, we want to create a document in our User collection with fields name and description, we will make use of […]

Java Integration with MongoDB

Java Integration with MongoDB In this, we will learn how to integrate MongoDB with Java and will explore the basic CRUD (Create, Retrieve, Update and Delete) operations. Download Jar, use mongo-java-driver-3.10.0.jar. Add jar to the Java build path. Now, we are ready for performing CRUD operations with MongoDB through Java. Here, we are making use of […]

Sharding in MongoDB

Sharding in MongoDB Sharding is the mechanism of storing data across multiple machines. The basic principle of this feature of MongoDB is to support the data growth which is expected any application. Because, at one point of time the accessibility of any application will definitely result in increase of the data growth and it would […]

Back To Top