1
00:00:00,000 --> 00:00:04,955
[MUSIC]

2
00:00:04,955 --> 00:00:09,679
In the previous lesson, we learned about
MongoDB, we downloaded an in-store

3
00:00:09,679 --> 00:00:14,490
MongoDB and interacted with the Mongo
server using the Mongo ripple.

4
00:00:14,490 --> 00:00:20,480
But of course, that is not the way we
envision using MongoDB in this course.

5
00:00:20,480 --> 00:00:26,480
Instead, we want to be able to access
the MongoDB server from within our node or

6
00:00:26,480 --> 00:00:28,010
express application.

7
00:00:28,010 --> 00:00:32,470
So how do we access the Mongo server
from within our node application?

8
00:00:32,470 --> 00:00:38,309
So this is where we have a node JS
based driver that is officially

9
00:00:38,309 --> 00:00:43,597
available from the Mongol Developers
that we can make use

10
00:00:43,597 --> 00:00:48,664
of connect to the Mongo server
from within our Node.js

11
00:00:48,664 --> 00:00:53,642
application or
within our expressive application.

12
00:00:53,642 --> 00:01:01,309
So let's learn a little bit more about
that Node.js and MongoDB climber.

13
00:01:01,309 --> 00:01:06,547
So as I mentioned, the Node MongoDB Driver
provides a high-level API

14
00:01:06,547 --> 00:01:12,870
that enables you to access the Mongo
server from within your Node application.

15
00:01:12,870 --> 00:01:17,540
And it provides you with many
methods that enable you to interact

16
00:01:17,540 --> 00:01:19,650
with your Mongo server.

17
00:01:19,650 --> 00:01:25,280
Now, to install that MongoDB
driver which is a node module,

18
00:01:25,280 --> 00:01:32,545
we type npm install mongodb and --save
to install it within our application.

19
00:01:32,545 --> 00:01:37,780
Thereafter, we will then develop
our Node.js application,

20
00:01:37,780 --> 00:01:43,650
and then require this app,
MongoDB driver, and they make use of

21
00:01:43,650 --> 00:01:49,840
the node module to access the MongoDB
server from within our application.

22
00:01:49,840 --> 00:01:55,790
The MongoDB driver, which is nothing but
a node module, provides several operations

23
00:01:55,790 --> 00:02:01,660
that can be carried out on the MongoDB
server from within our Node application.

24
00:02:01,660 --> 00:02:06,360
It allows you to connect to the MongoDB
server, obviously and thereafter,

25
00:02:06,360 --> 00:02:11,760
allows you to perform various database
operations like inserting, deleting and

26
00:02:11,760 --> 00:02:17,530
updating an existing record or
adding new records to your database.

27
00:02:17,530 --> 00:02:22,090
Also, it provides various base of
creating the documents that already

28
00:02:22,090 --> 00:02:23,730
within the database.

29
00:02:23,730 --> 00:02:29,170
We will look at some examples of how they
make use of the various metrics that

30
00:02:29,170 --> 00:02:34,930
the MongoDB Driver provides for
us in the exercises for this lecture.

31
00:02:34,930 --> 00:02:39,530
Now, the driver itself supports
both callback based and

32
00:02:39,530 --> 00:02:43,430
promise based interactions
with the MongoDB server.

33
00:02:43,430 --> 00:02:48,391
So let's look at some details
of this in the next exercise.

34
00:02:48,391 --> 00:02:51,289
[MUSIC]