In this tutorial, we will learn how to use MongoDB with Java programming language.
MongoDB is a cross-platform, document-oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on the concept of collections and documents.
Before getting started with the Java MongoDB tutorial, let's first familiar with few MongoDB basic concepts like database, collection, and document.
Documents in MongoDB are equivalent to the rows in RDBMS.
Fields in MongoDB are equivalent to the columns in RDBMS.
MongoDB is a cross-platform, document-oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on the concept of collections and documents.
Before getting started with the Java MongoDB tutorial, let's first familiar with few MongoDB basic concepts like database, collection, and document.
Database
A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system (DBMS).Collection
A collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purposes.Document
A document is a set of key-value pairs. Documents have a dynamic schema. Dynamic schema means that documents in the same collection do not need to have the same set of fields or structures, and common fields in a collection's documents may hold different types of data.Mapping Relational Database to MongoDB - Summary
Collections in MongoDB are equivalent to the tables in RDBMS.Documents in MongoDB are equivalent to the rows in RDBMS.
Fields in MongoDB are equivalent to the columns in RDBMS.
Fields (key and value pairs) are stored in a document, documents are stored in collection and collections are stored in a database.
MongoDB Tutorial for Beginners
Java MongoDB Tutorial Examples
- Install MongoDB in Windows 10 - Zip Package - In this quick article, we will learn how to install step by step MongoDB zip version in windows 10.
- Java MongoDB Connection Example - This tutorial shows how to write a Java program to connect to a standalone MongoDB server.
- Java MongoDB Create Collection Example - This tutorial shows how to create a collection in MongoDB using Java.
- Java MongoDB Drop Collection Example - This tutorial shows how to drop an existing collection in MongoDB using a Java program.
- Java MongoDB Create or Insert Document Example Tutorial - This tutorial shows how to use create or insert operations to add new documents to a collection in MongoDB using a Java program.
- Java MongoDB Update Document Example - This tutorial shows how to update documents in the collection in MongoDB using a Java program.
- Java MongoDB Read Document Example - This tutorial shows how to read documents from a collection in MongoDB using a Java program.
- Java MongoDB Delete Document Example - This tutorial shows how to delete a document in the collection in MongoDB using a Java program.
- MongoDB Java CRUD Operations Example Tutorial - In this tutorial, we will learn how to perform common CRUD (Create, Read, Update, Delete) operations in MongoDB using Java 10.
MongoDB + Spring Boot Tutorials/Examples
- Spring Boot + MongoDB CRUD Example Tutorial - In this tutorial, we will learn to integrate MongoDB with a Spring Boot Application and perform different CRUD operations (Create, Read, Update, and Delete operations) on the Employee entity.
- Spring Boot + MongoDB Auto-Generated Field Example - In this tutorial, we're going to learn how to implement a sequential, auto-generated field for MongoDB in Spring Boot.
- Spring Boot CRUD Rest API + MongoDB + Maven Example Tutorial - In this tutorial, we will learn to integrate MongoDB with a Spring Boot Application and perform different CRUD operations (Create, Read, Update, and Delete operations) on the Product entity.
MongoDB + Spring Boot + Angular Tutorials/Examples
- Spring Boot + Angular + MongoDB CRUD Example Tutorial - In this tutorial, we will be building step by step an Angular CRUD Web Application using Spring Boot + Angular + MongoDB from scratch.
MongoDB GitHub Repositories
Free Spring Boot Tutorial | Full In-depth Course | Learn Spring Boot in 10 Hours
Watch this course on YouTube at Spring Boot Tutorial | Fee 10 Hours Full Course