1
00:00:08,280 --> 00:00:09,540
Welcome back.

2
00:00:09,570 --> 00:00:17,400
In this video, let's see how we can delete a record or to be more specific, how we can delete a student.

3
00:00:17,400 --> 00:00:21,450
And the process is simple using MongoDB.

4
00:00:21,480 --> 00:00:22,560
So here you go.

5
00:00:22,560 --> 00:00:25,020
Const delete it.

6
00:00:25,530 --> 00:00:31,050
Student equal to await my student collection.

7
00:00:31,050 --> 00:00:34,800
And on that we have a method called delete one.

8
00:00:34,800 --> 00:00:38,520
We have delete many and delete one delete many.

9
00:00:38,520 --> 00:00:42,600
Delete multiple record and delete one delete a single record.

10
00:00:42,600 --> 00:00:48,780
And for this we will pass in the student that we want to delete or a record that we want to delete.

11
00:00:49,080 --> 00:00:53,780
So I want to delete a student by name boa.

12
00:00:53,940 --> 00:00:54,930
That is my name.

13
00:00:54,930 --> 00:00:58,500
I want to delete that and that is it.

14
00:00:58,500 --> 00:01:06,090
So here, if I cancel log the delete student, I'm going to get a confirmation message that acknowledged.

15
00:01:06,090 --> 00:01:07,830
So moment of truth.

16
00:01:07,920 --> 00:01:14,220
So let me clear the terminate here and let me restart the file and let's see.

17
00:01:14,460 --> 00:01:19,980
Yes, acknowledge deleted count one meaning that I have deleted one record.

18
00:01:19,980 --> 00:01:29,190
So if I comment this one and I want to fetch all students and this is a record, let's find the method

19
00:01:29,190 --> 00:01:39,760
for fetching or which is this one so I can go ahead and console.log the or students and let's see click

20
00:01:39,810 --> 00:01:43,260
the terminal here and let's restart a file.

21
00:01:43,350 --> 00:01:50,730
Let's see, I'm going to see two students and indeed there is no training but inside the array of students.

22
00:01:50,730 --> 00:01:54,480
So guys, this how you can make use of crowd operation.

