1 00:00:00,210 --> 00:00:06,390 In this video you're going to connect to your Mongo DB database from a node j s application and you're 2 00:00:06,390 --> 00:00:10,230 going to learn how to insert new documents into the database. 3 00:00:10,230 --> 00:00:14,720 Now to get all of this done we'll be using the Mongo D.B. native driver. 4 00:00:15,150 --> 00:00:21,210 This is nothing more than an NPR module we're going to install and it's going to allow us to interact 5 00:00:21,210 --> 00:00:25,360 with our database from node before we actually install anything. 6 00:00:25,380 --> 00:00:30,780 I want to take a quick moment to pull up this module in the Web so you know where it lives and you know 7 00:00:30,810 --> 00:00:33,360 where you can learn more to kick things off. 8 00:00:33,360 --> 00:00:37,740 Let's head over to the browser and explore this native driver. 9 00:00:37,830 --> 00:00:43,070 I'm going to close the two tabs I had open in the installation videos and to kick things off. 10 00:00:43,110 --> 00:00:48,910 We'll be heading over to the Mongo DB home page at Mongo D.B. dot com. 11 00:00:48,990 --> 00:00:52,730 Here we're looking for their documentation section up top. 12 00:00:52,740 --> 00:01:00,060 We have docs and once we're out the documentation we're looking for docs about their Mongo DB drivers 13 00:01:00,280 --> 00:01:03,520 which is in the sidebar just a few items down. 14 00:01:03,630 --> 00:01:10,500 The drivers are the libraries that allow you to interact with the Mongo DB database from a wide range 15 00:01:10,500 --> 00:01:13,050 of programming languages down below. 16 00:01:13,050 --> 00:01:17,250 They have native drivers for about a dozen or so different languages. 17 00:01:17,250 --> 00:01:23,310 We have Si we have Java node HP Python Ruby and others. 18 00:01:23,310 --> 00:01:30,420 I'm going to go ahead and click node j s to find the native drivers for the platform we're using now 19 00:01:30,420 --> 00:01:31,180 right here. 20 00:01:31,200 --> 00:01:37,570 The most recent release is three point one of the driver and there are two links for the documentation. 21 00:01:37,560 --> 00:01:43,320 There's the reference which contains more tutorials and guides about how to use features. 22 00:01:43,320 --> 00:01:49,170 This is essentially what we're going to cover in the videos anyways but there is importantly the API 23 00:01:49,200 --> 00:01:50,580 documentation. 24 00:01:50,580 --> 00:01:57,270 This contains documentation for every single property function or method available with the driver. 25 00:01:57,270 --> 00:02:02,550 We'll be referring back to the documentation here and there as we explore new features. 26 00:02:02,550 --> 00:02:05,540 So we'll leave the docs up though I'll close the other page. 27 00:02:05,540 --> 00:02:11,670 The Mongo D.B. home page and the last thing we're gonna pull out before we move into visual studio code 28 00:02:11,910 --> 00:02:13,530 is the NPM module. 29 00:02:13,530 --> 00:02:20,980 PAGE You can google NPM Mongo D.B. to find the package the package name is Mongo D.B.. 30 00:02:21,090 --> 00:02:26,480 This is the official native driver released by the Mongo D.B. company. 31 00:02:26,550 --> 00:02:32,340 So down below it's a very popular module with about a million weekly downloads and it contains some 32 00:02:32,340 --> 00:02:38,550 basic instructions for getting started and also links over to the documentation which we actually already 33 00:02:38,550 --> 00:02:40,260 have open down below. 34 00:02:40,260 --> 00:02:44,810 There's other information about getting started though we're gonna work through all of that right now. 35 00:02:45,000 --> 00:02:47,070 So let's go ahead and create a new project. 36 00:02:47,160 --> 00:02:53,400 Get this installed and use it to insert some documents into the database to do this we're going to navigate 37 00:02:53,430 --> 00:02:58,870 over to visual studio code and we're going to open up a second terminal tab. 38 00:02:58,950 --> 00:03:04,290 We want to leave the database running the database needs to be running in order for us to connect to 39 00:03:04,290 --> 00:03:06,920 it so we don't want to shut this down. 40 00:03:06,930 --> 00:03:10,070 I'm going to click that plus button to open up a new tab. 41 00:03:10,110 --> 00:03:12,050 So right here I now have two. 42 00:03:12,140 --> 00:03:14,380 One is running Mongo D.B.. 43 00:03:14,390 --> 00:03:19,620 And that's going to stay as is for the duration of this project and the other. 44 00:03:19,620 --> 00:03:26,790 This is where we're gonna run application commands like npm install or node to start up our app first 45 00:03:26,790 --> 00:03:31,350 up let's go ahead and create a directory where we can put all of the code right here. 46 00:03:31,350 --> 00:03:36,630 I'm going to create a new folder and I'll call this one task manager. 47 00:03:36,630 --> 00:03:43,560 Now once we have the task manager directory in place I want to use C D to navigate into that directory 48 00:03:43,590 --> 00:03:52,090 so I can initialize NPM and I can install the module CDE task manager once we're in the task manager 49 00:03:52,090 --> 00:03:52,840 directory. 50 00:03:52,840 --> 00:03:57,880 We're gonna use NPM in it with the Y flag to generate the package. 51 00:03:57,940 --> 00:04:00,250 Jason File using all of the defaults. 52 00:04:00,280 --> 00:04:04,750 Right here it has been created and we can see it inside of our project route. 53 00:04:05,020 --> 00:04:13,510 From there we're going to install the new module we want to use NPM ie Mongo D.B. at three point one 54 00:04:13,570 --> 00:04:15,110 point one zero. 55 00:04:15,130 --> 00:04:20,770 I'm gonna run the installation command which will generate the node modules directory and from here 56 00:04:20,770 --> 00:04:26,620 we're actually ready to use the driver to connect to our database and insert some documents. 57 00:04:26,620 --> 00:04:32,410 Now the task manager app is going to have a lot more code in the future and we're going to have a nice 58 00:04:32,560 --> 00:04:36,310 advanced directory structure to stay organized for the moment. 59 00:04:36,310 --> 00:04:42,790 We really just need a single script as we start to play around with Mongo D.B. right here. 60 00:04:42,790 --> 00:04:50,020 I'm going to create a mongo D.B. dot J.S. file and we're gonna use this file to explore all of those 61 00:04:50,050 --> 00:04:52,880 operations we want to be able to support. 62 00:04:52,900 --> 00:05:01,060 So we want to figure out how we can perform all of the crud operations crud it stands for Create read 63 00:05:01,180 --> 00:05:02,620 update and delete. 64 00:05:02,710 --> 00:05:08,850 We need to be able to perform all of these operations to be able to manage our data successfully. 65 00:05:08,860 --> 00:05:16,120 Let's get started by importing the module we just installed down below a new constant Mongo D.B. which 66 00:05:16,120 --> 00:05:23,020 is going to store whatever comes back from requiring the Mongo D.B. NPM library and what comes back 67 00:05:23,050 --> 00:05:24,370 is an object. 68 00:05:24,370 --> 00:05:29,340 Now on that object there's one thing we need to actually initialize the connection. 69 00:05:29,350 --> 00:05:31,930 This is known as the Mongo client. 70 00:05:31,930 --> 00:05:39,700 So we're going to create a new constant for that Mongo uppercase M client and we'll get that off of 71 00:05:39,700 --> 00:05:49,180 Mongo D.B. dot once again uppercase M Mongo uppercase C client the Mongo client is gonna give us access 72 00:05:49,180 --> 00:05:56,260 to the function necessary to connect it to the database so we can perform our four basic CRUD operations. 73 00:05:56,380 --> 00:06:02,130 Now before we actually get into the connection side of things we have to define the connection U.R.L. 74 00:06:02,410 --> 00:06:07,720 in the database we're trying to connect to and I'm going to do that using two variables. 75 00:06:07,810 --> 00:06:14,950 I'll have one be a constant connection you are L which will equal a string will fill the value out in 76 00:06:14,950 --> 00:06:22,450 just a moment and we're going to have a second one as well database once again this will also be a string 77 00:06:22,480 --> 00:06:25,360 and we'll fill that value out in a second. 78 00:06:25,360 --> 00:06:31,630 Now for the connection U.R.L. we want to connect to that local host server that's up and running in 79 00:06:31,630 --> 00:06:36,700 our first terminal tab devalue we have to provide for that is the following. 80 00:06:36,700 --> 00:06:44,170 It starts off with Mongo D.B. colon forward slash forward slash we're using their protocol then from 81 00:06:44,170 --> 00:06:54,400 there it would be the IP address 1 2 7 0 0 1 followed by the port which would be a colon and the default 82 00:06:54,400 --> 00:06:58,090 port we know is 2 7 0 1 7. 83 00:06:58,180 --> 00:07:04,480 Now you might be wondering why I'm typing out the local host IP instead of literally typing out local 84 00:07:04,480 --> 00:07:05,320 host. 85 00:07:05,320 --> 00:07:11,320 That's because local host has known to cause some really strange issues where it slows down your application 86 00:07:11,350 --> 00:07:12,930 and things start to fail. 87 00:07:12,940 --> 00:07:19,240 We're not exactly sure why that is all we know is that when we type out the entire IP that issue doesn't 88 00:07:19,240 --> 00:07:22,310 happen and the application works as expected. 89 00:07:22,390 --> 00:07:29,520 So I definitely recommend using the full IP right here as it won't cause problems later in the class. 90 00:07:29,530 --> 00:07:33,960 Next up the database name we can pick whatever we want for this. 91 00:07:34,000 --> 00:07:42,190 I'm gonna go ahead and use task hyphen manager if the data is for my task manager app a database name 92 00:07:42,190 --> 00:07:48,340 of task manager it seems appropriate enough now that we have this in place we have all of the information 93 00:07:48,340 --> 00:07:51,460 we need to actually connect to our database. 94 00:07:51,460 --> 00:07:56,920 Actually I'm gonna change this from database to database name to be a little more explicit about what 95 00:07:56,920 --> 00:07:59,830 exactly is being stored inside of there. 96 00:07:59,830 --> 00:08:06,680 From here we can now use Mongo client to connect to the server Mongo client has one method we're gonna 97 00:08:06,700 --> 00:08:12,760 end up using that is appropriately called Connect and connect takes in quite a few different arguments 98 00:08:12,940 --> 00:08:15,000 to actually set up the connection. 99 00:08:15,040 --> 00:08:17,400 The first is the connection you are El. 100 00:08:17,500 --> 00:08:23,770 Now I already have that stored in a variable so I can simply reference connection you are all right 101 00:08:23,770 --> 00:08:30,730 here to use the following value that is the value we're trying to use then as the second argument we're 102 00:08:30,730 --> 00:08:38,320 going to provide an options object right here we're gonna be setting up a single option which is use 103 00:08:39,010 --> 00:08:44,000 new you are Rel parser we're gonna set this to true. 104 00:08:44,140 --> 00:08:51,720 So the U R L parser that was originally used by default is being deprecated and required to pass in 105 00:08:51,720 --> 00:08:57,450 this option in order for argue our ls to be passed correctly so we can actually connect to the server 106 00:08:57,810 --> 00:09:01,090 so that is arguments won and arguments do. 107 00:09:01,220 --> 00:09:08,090 The last argument we're going to pass to the Connect function is going to be a callback function. 108 00:09:08,250 --> 00:09:14,910 The callback function is gonna get called when we're actually connected to the database so connecting 109 00:09:14,910 --> 00:09:18,250 to the database it is not a synchronous operation. 110 00:09:18,300 --> 00:09:24,090 It is indeed asynchronous it's going to take a bit of time to get that connection set up and the callback 111 00:09:24,090 --> 00:09:27,820 function will run when the Connect operation is complete. 112 00:09:27,840 --> 00:09:33,270 Now it could either fail or succeed and you're gonna get access to different arguments depending on 113 00:09:33,270 --> 00:09:39,570 what happens in this callback is gonna get called with either an error or with a client. 114 00:09:39,660 --> 00:09:45,690 If the first argument exists that means things went wrong and it will contain an error message describing 115 00:09:45,720 --> 00:09:47,230 why it couldn't connect. 116 00:09:47,340 --> 00:09:52,830 If the second argument exists that means things went well and you're now connected to the server and 117 00:09:52,830 --> 00:09:57,980 you can start to manipulate your databases inside of the callback function. 118 00:09:57,990 --> 00:10:01,830 The first thing we're gonna do is handle any potential errors that occurred. 119 00:10:01,830 --> 00:10:05,910 Let's start with an if statement to check if an error occurred right here. 120 00:10:05,910 --> 00:10:12,030 If one did we're just going to use console dot log to print a message to the console and we'll say something 121 00:10:12,030 --> 00:10:17,040 like unable to connect to database perfect. 122 00:10:17,040 --> 00:10:21,600 Now the code below is only going to run if the connection actually worked. 123 00:10:21,600 --> 00:10:27,900 So to prevent this code from running when an error occurs I'm gonna use return right here to stop the 124 00:10:27,900 --> 00:10:29,440 function execution. 125 00:10:29,490 --> 00:10:35,100 So if an error occurs we print the message and I use return it simply to stop the function from continuing 126 00:10:35,100 --> 00:10:36,210 to execute. 127 00:10:36,330 --> 00:10:41,340 That's going to ensure that the code down below only runs when things went well. 128 00:10:41,430 --> 00:10:43,410 And what are we going to do for the moment. 129 00:10:43,410 --> 00:10:49,830 We'll just use console log to print a message connected correctly. 130 00:10:49,950 --> 00:10:50,740 Perfect. 131 00:10:50,850 --> 00:10:53,540 If we see this we know things went wrong. 132 00:10:53,550 --> 00:10:56,450 If we see this we know things went well. 133 00:10:56,460 --> 00:11:00,300 Now let's go ahead and save the file and try to connect from the terminal. 134 00:11:00,300 --> 00:11:08,280 I'm going to go ahead and execute our node script that's going to be node space Mongo D.B. dot J S I'm 135 00:11:08,280 --> 00:11:09,230 going to run it. 136 00:11:09,240 --> 00:11:10,160 And what do we get. 137 00:11:10,170 --> 00:11:13,670 Right here I get connected correctly which is fantastic. 138 00:11:13,680 --> 00:11:19,300 That means we were able to connect to our Mongo D.B. server using Node J. 139 00:11:19,310 --> 00:11:23,460 S Now before we go any further with the code in this file. 140 00:11:23,460 --> 00:11:29,430 I want to switch over to the other terminal tab where our Mongo DB server is running and you'll notice 141 00:11:29,430 --> 00:11:34,730 that down below we're gonna end up getting information about the connections that come and go. 142 00:11:34,740 --> 00:11:37,820 So right here I see connection accepted from. 143 00:11:37,830 --> 00:11:40,480 And then the following IP and port. 144 00:11:40,740 --> 00:11:45,570 So this is letting us know that someone did indeed connect to the database. 145 00:11:45,570 --> 00:11:51,150 Now it's important to note that at times you'll only have one connection but you'll see a message saying 146 00:11:51,150 --> 00:11:53,790 you have five or six open connections. 147 00:11:53,790 --> 00:11:58,590 That's because when we connect with Mongo D.B. it uses a connection pool. 148 00:11:58,590 --> 00:12:03,330 So there's actually more connections that are opened behind the scenes even though we've only called 149 00:12:03,330 --> 00:12:09,990 Connect once that makes sure that our node J.S. application can still communicate quickly even if we're 150 00:12:09,990 --> 00:12:13,780 trying to perform a lot of operations at the same time. 151 00:12:13,800 --> 00:12:19,350 So now over in the second tab where we're running our node app you'll notice that it's still hanging 152 00:12:19,360 --> 00:12:24,630 it hasn't brought us back to the command prompt and that's because once the connection is opened your 153 00:12:24,630 --> 00:12:28,310 node process is going to stay up and running as long as you let it. 154 00:12:28,440 --> 00:12:34,260 Or as long as that connection remains active we can always close the connection and shut down the node 155 00:12:34,260 --> 00:12:37,770 process by using control C from the terminal. 156 00:12:37,770 --> 00:12:38,820 So there we go. 157 00:12:38,850 --> 00:12:41,630 We successfully connected to the database. 158 00:12:41,640 --> 00:12:45,120 Now it's time to insert our very first document. 159 00:12:45,120 --> 00:12:49,880 I'll be removing this console dot log call and replacing it with some other code. 160 00:12:49,890 --> 00:12:55,160 The first thing we need to do is get a reference to the specific database we want to manipulate. 161 00:12:55,230 --> 00:12:58,170 In this case we chose the name task manager. 162 00:12:58,170 --> 00:13:04,730 Now with Mongo D.B. there's no need to create this database using Mongo D.B. or using the gooey rowboat 163 00:13:04,740 --> 00:13:08,670 3 T simply by picking a name and accessing it. 164 00:13:08,760 --> 00:13:11,970 Mongo D.B. will automatically create it for us. 165 00:13:11,970 --> 00:13:16,890 So right here what I do is use client dot D.B.. 166 00:13:16,890 --> 00:13:20,450 This takes as its one and only argument the name of the D.B.. 167 00:13:20,460 --> 00:13:27,870 You're trying to manipulate in our case we stored that name in the database name variable and what it 168 00:13:27,870 --> 00:13:34,740 gives you back is a database reference typically stored in a variable called D.B. which we can now use 169 00:13:34,740 --> 00:13:36,860 to manipulate that database. 170 00:13:36,870 --> 00:13:42,200 Once again no need to create that simply using it in the code is enough. 171 00:13:42,210 --> 00:13:49,080 Now we know that with our no rescue l databases like Mongo D.B. we don't have tables we have collections. 172 00:13:49,080 --> 00:13:54,930 The next thing we need to do before we can insert a document is figure out which collection we're trying 173 00:13:54,930 --> 00:13:57,060 to insert the document into. 174 00:13:57,160 --> 00:14:01,340 We can use collections to track all of the distinct things in our application. 175 00:14:01,350 --> 00:14:06,930 We can have a collection for users a collection for tasks and a collection for anything else we might 176 00:14:06,930 --> 00:14:08,070 need to track. 177 00:14:08,100 --> 00:14:13,080 We're gonna go ahead and insert a single document into a user's collection. 178 00:14:13,080 --> 00:14:21,090 To do that we use D.B. dot collection and collection is a function so we'll call it as such and it expects 179 00:14:21,090 --> 00:14:24,070 the name of the collection you're trying to manipulate. 180 00:14:24,210 --> 00:14:27,390 In this case let's go ahead and use users. 181 00:14:27,570 --> 00:14:34,080 From here we can go ahead and call a method on that collection reference to insert a document. 182 00:14:34,110 --> 00:14:41,760 This is insert one insert one expects an object as that first argument and this should contain all of 183 00:14:41,760 --> 00:14:44,390 the data you're trying to insert for the moment. 184 00:14:44,430 --> 00:14:50,760 Let's go ahead and just put in two fields about us we'll make ourselves the first user I'll set name 185 00:14:50,790 --> 00:14:53,110 equal to my first name. 186 00:14:53,110 --> 00:14:56,460 And I'm also going to set age equal to my age. 187 00:14:56,460 --> 00:14:57,450 And there we go. 188 00:14:57,450 --> 00:15:02,190 We're going to insert a very simple document into that user's collection. 189 00:15:02,340 --> 00:15:06,810 Now that we have this in place let's go ahead and save Mongo D.B. dot J. 190 00:15:06,800 --> 00:15:09,480 S and from terminal down below. 191 00:15:09,480 --> 00:15:12,380 I'm gonna use clear to clear the terminal output. 192 00:15:12,390 --> 00:15:16,820 Now let's go ahead and run our script once again node Mongo D.B.. 193 00:15:16,820 --> 00:15:17,810 Dot J S. 194 00:15:17,850 --> 00:15:22,970 And once again it's still going to hang out even though the operation has been completed. 195 00:15:23,010 --> 00:15:26,300 We're not seeing any messaging at all which is a good thing. 196 00:15:26,310 --> 00:15:29,720 The only message we would ever see is if things went wrong. 197 00:15:29,790 --> 00:15:35,630 Now to actually ensure that our data was inserted correctly we can use robo three T. 198 00:15:35,640 --> 00:15:38,580 That is the whole point of that administration tool. 199 00:15:38,580 --> 00:15:41,580 So let's go ahead and head over there to view our data. 200 00:15:41,580 --> 00:15:47,880 I'm going to crack open robo 3 ti which is still connected to that local Mongo DB database connection. 201 00:15:47,880 --> 00:15:54,690 We set up and the last video I'm going to close both open tabs the Welcome tab and the one tab we used 202 00:15:54,870 --> 00:16:00,930 to run a command in the last video to test the connection from here what I'm going to do is right click 203 00:16:00,930 --> 00:16:07,140 that connection and click refresh and you'll notice we have a brand new database showing up called Task 204 00:16:07,140 --> 00:16:12,860 Manager which matches up perfectly with the database name we chose inside of our code. 205 00:16:12,870 --> 00:16:17,960 Now if we actually crack that open we can view the collections for task manager. 206 00:16:17,970 --> 00:16:19,230 And what do we have. 207 00:16:19,230 --> 00:16:25,770 We have a single collection users and users that matches up perfectly with the name we chose for our 208 00:16:25,770 --> 00:16:30,840 collection right here on line 16 of our JavaScript file. 209 00:16:30,840 --> 00:16:36,110 Now we can actually look at the data stored inside of there simply opening it up is not enough. 210 00:16:36,120 --> 00:16:41,580 We have to right click that collection and then we can click view documents. 211 00:16:41,580 --> 00:16:46,860 When we do that it's going to grab all of the documents stored in that collection and it's going to 212 00:16:46,860 --> 00:16:49,250 dump them to the gooey interface. 213 00:16:49,260 --> 00:16:54,810 Right here we have a single document and if we expand that we can view the data stored inside of it. 214 00:16:54,840 --> 00:16:57,590 We have three fields two of which we created. 215 00:16:57,630 --> 00:17:03,980 I have the name field with the value Andrew and I have the age field with the value twenty seven. 216 00:17:03,990 --> 00:17:10,680 Now you'll notice this third field underscore I.D. which we did not create under score I.D. store is 217 00:17:10,680 --> 00:17:14,250 a unique identifier for that particular document. 218 00:17:14,250 --> 00:17:17,130 And this is not something that's unique to mongo D.B.. 219 00:17:17,130 --> 00:17:24,090 If you've used Eskew own databases before like my S Q Well you know you have that I.D. column with the 220 00:17:24,150 --> 00:17:30,840 auto incrementing integer which goes from one to two to three to four as you add new records into a 221 00:17:30,840 --> 00:17:33,030 table with Mongo D.B.. 222 00:17:33,030 --> 00:17:40,080 We also have an I.D. property but it's stored on underscore I.D. This is a unique identifier for the 223 00:17:40,080 --> 00:17:43,370 particular document allowing us to identify it. 224 00:17:43,380 --> 00:17:48,150 Now we'll talk more about the value and what exactly an object I.D. is. 225 00:17:48,150 --> 00:17:53,580 As we progressed through the section for now all you need to know is that when you insert a document 226 00:17:53,760 --> 00:17:58,100 it's going to have a unique identifier automatically generated for us. 227 00:17:58,140 --> 00:17:59,850 And that's a good thing. 228 00:17:59,850 --> 00:18:06,970 Now from here we can explore some other ways we can view our data in robo 3 T up here on the top right. 229 00:18:06,990 --> 00:18:09,330 We are currently in the tree view. 230 00:18:09,330 --> 00:18:15,020 We could also switch over to the table view to view our data in a more traditional table. 231 00:18:15,030 --> 00:18:20,030 We also have a couple of other views we have text mode which is not particularly useful. 232 00:18:20,100 --> 00:18:24,810 Typically I'll stick with either the tree view or the table view. 233 00:18:24,810 --> 00:18:30,330 So now that we have one document in place it's time to move on to the next video where we're going to 234 00:18:30,330 --> 00:18:33,380 continue to explore how we can insert data. 235 00:18:33,600 --> 00:18:38,460 And there's also going to be a challenge where you're gonna have to insert data into a new collection 236 00:18:38,520 --> 00:18:39,700 on your own. 237 00:18:39,720 --> 00:18:43,420 Let's take a quick moment to recap what we did in this video. 238 00:18:43,440 --> 00:18:47,130 We installed the Mongo D.B. NPM library. 239 00:18:47,130 --> 00:18:54,330 This is a native driver created by the Mongo DB company allowing us to connect to a Mongo DB database 240 00:18:54,330 --> 00:18:55,950 from node j s. 241 00:18:56,040 --> 00:19:03,060 Here we used the Connect method to connect to this specific server and we use the D.B. method on client 242 00:19:03,240 --> 00:19:05,840 to get the connection for these specific database. 243 00:19:05,850 --> 00:19:12,320 From there we were able to insert our one document and view it over inside of robo three T. 244 00:19:12,570 --> 00:19:17,700 Let's go ahead and continue on to the next video and continue to explore insertions.