Java MongoDB CRUD Operations Tutorial

preview_player
Показать описание
Learn to code a Java application that connects to a local instance of MongoDB database server to perform CRUD operations (Create, Retrieve, Update and Delete) using MongoDB Driver for Java.

In details, you will learn:
- Start MongoDB community server in secured (authentication) mode and run Mongo Shell.
- Create a Java Maven project and declare dependencies for MongoDB Java driver and configure SLF4J with Log4j 1.2
- Write code for a MongoDB client application connects to the server
- Code the 1st Java program to insert some JSON documents into a collection in a database.
- Code the 2nd program to find/query documents from a collection.
- Code the 3rd program to update documents in a collection.
- Code the 4th program to delete documents from a collection.

Software programs used:
- Java Development Kit (JDK)
- Eclipse IDE
- MongoDB Community Server & Mongo Shell
Рекомендации по теме
Комментарии
Автор

I met your channel today and now I'll see all videos, i love met channel of programing in java, i'm begin programing and your channel will help me a lot.thank you for great content

AKssupersan
Автор

Thank, hi vọng anh ra tiếp video CRUD nâng cao trong mongodb. Video của a rất dễ hiểu

SonNguyen-nxex
Автор

This is a god send to learn between console app and constructed class like this.

wpatyune
Автор

Thank you for this quick tutorial. I was in need of something that was quick and basic crude on mongoDB.

fatalsturm
Автор

NAM can you please explain the charts and graphs topic in spring boot instead of using Excel

rajashekar
Автор

i am looking for mongodb CRUD with Android studio and java

Alaa-mcvu
Автор

What's the different between Rating and Size in your example, they are also a list of objects? Thanks

wpatyune
Автор

Connect db by using your method, and I got The method forEach(Block<? super String>) is ambiguous for the type MongoIterable<String>. SO need to change to super Document>) name -> System.out.println(name));

wpatyune
Автор

How to insert date like expiry or birthday or deadline? With this java mongodb

mr.RAND
Автор

please help me i am new to mongodb how to translate in java code I tried a lot but I won't get a total of in fields
db.student123.aggregate([{ $match:{_id:1225}},
{$project :{"_id":1, "name":1,
"TotalMarks":{$avg:["$maths", "chemistry", "physics"]}}
}
])

abhishekkrishnaiah
Автор

What about create field without manually input value? @17:50(insert) @37:36(find) @52:20(update)

wpatyune
Автор

BTW awesome tutorial!!! Helped prime and prep me for my new project. I getting the required results however before the output this message comes up in the console when i run my application. Any ideas on how to fix this? Thanks
Reported exception:
Receiver class does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface
at
at
at
at
at
at
at
at
at
console

ikirika