1 00:00:02,120 --> 00:00:07,730 Before we dive into the actual code, there's one important thing you have to know and that is that 2 00:00:07,730 --> 00:00:16,550 you have to understand how the work between management of the database, probably through the shell and interacting 3 00:00:16,550 --> 00:00:18,840 with the database through the driver, 4 00:00:18,860 --> 00:00:24,780 how these two parts are separated or split up, how you split the work. 5 00:00:24,850 --> 00:00:26,260 Now for the shell, 6 00:00:26,260 --> 00:00:33,180 so what we used in this course, you'll typically stay to the shell for things like configuring the database, 7 00:00:33,370 --> 00:00:39,940 creating collections or creating indexes because these are tasks which you typically do up front, 8 00:00:39,940 --> 00:00:45,850 so when you set up the backend for your application. You don't really do that right from inside the 9 00:00:45,850 --> 00:00:51,590 driver because the driver is tightly coupled to your application, to your application logic 10 00:00:51,670 --> 00:00:58,540 and if you're building an online shop for example, your code will basically be responsible for handling 11 00:00:58,540 --> 00:01:03,130 products, users, for working with orders and things like that. 12 00:01:03,310 --> 00:01:07,590 The initial database setup is not something your application deals with, 13 00:01:07,600 --> 00:01:12,130 it assumes that the database is there and that you can then communicate with the database. 14 00:01:12,280 --> 00:01:20,760 So this whole setup stuff will be done from inside a shell or basically up front. From inside the driver, 15 00:01:20,760 --> 00:01:27,820 so from inside your application so to say, you typically perform these different crud operations to store 16 00:01:27,880 --> 00:01:33,700 new data in the database or retrieve or update or delete it and you might also work with the aggregation 17 00:01:33,700 --> 00:01:37,760 pipeline to, well fetch data in a more structured way 18 00:01:37,810 --> 00:01:44,360 if your application requires that and the data format in a database doesn't fit the format you need it in, 19 00:01:44,590 --> 00:01:48,610 so this is how you can roughly split the responsibilities. 20 00:01:48,610 --> 00:01:53,990 Now technically you can absolutely create collections and indexes from inside the driver, 21 00:01:54,100 --> 00:01:55,700 so that is possible 22 00:01:55,750 --> 00:02:01,180 but with that, why don't we just have a look at all of that in an example application which I prepared 23 00:02:01,600 --> 00:02:03,610 and where we can now continue to work on.