1 00:00:02,230 --> 00:00:08,290 We saw how we can insert, update and delete things in the last lecture and therefore our flight data are 2 00:00:08,290 --> 00:00:12,720 now is empty as we can confirm if we run find, nothing is returned. 3 00:00:13,120 --> 00:00:14,720 Now time to add something again 4 00:00:14,830 --> 00:00:17,370 and there was this file you found attached earlier, 5 00:00:17,470 --> 00:00:20,110 you can find it attached again to this lecture. 6 00:00:20,110 --> 00:00:25,630 It holds an array of json documents and now I want to use the entire array, 7 00:00:25,630 --> 00:00:30,490 so make sure to copy the entire file content and then back in the shell, 8 00:00:30,790 --> 00:00:39,100 let's again access our flight data and use insertMany now. insertMany now allows you well as the name suggests, 9 00:00:39,130 --> 00:00:46,360 to insert many elements and this is actually not done by adding many elements separated by commas but 10 00:00:46,360 --> 00:00:47,990 instead by passing an array, 11 00:00:48,130 --> 00:00:50,210 so exactly the kind of data we got. 12 00:00:50,530 --> 00:00:54,240 Let's delete the closing parentheses and paste that in 13 00:00:54,400 --> 00:00:59,980 and then add the closing parentheses after the closing square brackets. And with that if you now hit enter, 14 00:01:00,330 --> 00:01:00,900 you see 15 00:01:00,940 --> 00:01:04,700 this was accepted and it inserted two IDs 16 00:01:04,900 --> 00:01:06,790 and there you also see this order, 17 00:01:06,790 --> 00:01:12,160 it automatically keeps which I mentioned. It's almost the same ID but the second ID has a c at the 18 00:01:12,160 --> 00:01:17,410 end and therefore, it will be ordered after the first element which makes sense because it was the second 19 00:01:17,440 --> 00:01:18,420 element inserted 20 00:01:18,520 --> 00:01:26,030 so mongodb keeps the order here. And now if we again access our flight data and find it all and pretty 21 00:01:26,040 --> 00:01:26,770 print it, 22 00:01:26,900 --> 00:01:30,930 here is our flight data with the automatically added IDs. 23 00:01:31,420 --> 00:01:35,860 So this is now insertMany and now you saw both, insertOne and insertMany, 24 00:01:35,860 --> 00:01:40,530 you also saw updateOne and updateMany and deleteOne and deleteMany. 25 00:01:41,020 --> 00:01:45,730 There is another thing I want to show you though and that is related to finding data.