1 00:00:02,160 --> 00:00:08,090 Now speaking of operators in the last lecture, we got a couple of different operators we can differentiate. 2 00:00:08,380 --> 00:00:16,150 We got query and projection operators, query selectors, basically the different operators like 3 00:00:16,150 --> 00:00:21,220 $gt which you saw in the last lecture which allow us to narrow down the set of documents we retrieve 4 00:00:21,670 --> 00:00:31,510 and projection operators that allow us to transform or kind of change the data we get back to some extent, 5 00:00:31,510 --> 00:00:34,740 these are read related operators. 6 00:00:34,960 --> 00:00:41,890 Now we'll also learn about update related operators later, where we can also basically update fields and 7 00:00:41,890 --> 00:00:45,070 arrays and there are different techniques for operating these things, 8 00:00:45,070 --> 00:00:51,020 so normal fields or arrays in a document, we'll learn about this in the update module of course 9 00:00:51,220 --> 00:00:54,040 and we also got query modifiers. 10 00:00:54,040 --> 00:00:56,440 Now this allows us to change the query behavior 11 00:00:56,500 --> 00:00:57,940 and this is deprecated now, 12 00:00:58,030 --> 00:01:03,430 so this will not be covered anymore because what you could do with these can now be done with the normal 13 00:01:03,850 --> 00:01:05,660 operators basically. 14 00:01:05,830 --> 00:01:12,340 We also can do some aggregation which is also reading data from the database but allows you to do more 15 00:01:12,340 --> 00:01:13,900 complex transforms 16 00:01:13,900 --> 00:01:20,170 basically. This is a very interesting concept where you basically set up a pipeline of stages to funnel 17 00:01:20,170 --> 00:01:25,120 your data through and you got a bunch of operators that allow you to shape the data you get back 18 00:01:25,390 --> 00:01:28,220 to the form you needed in your app 19 00:01:28,330 --> 00:01:31,420 and therefore we got a whole module for this where this will be covered, 20 00:01:31,420 --> 00:01:32,810 the aggregation module. 21 00:01:33,130 --> 00:01:37,640 So in this module, we'll focus on the read operators, in the update module, 22 00:01:37,660 --> 00:01:42,010 we'll have a look at the update operators. Now for inserts and deletes, 23 00:01:42,040 --> 00:01:44,950 there are no operators, for deletes 24 00:01:45,070 --> 00:01:50,080 there are but these will be the same as the read operators because there you just need to find data 25 00:01:50,080 --> 00:01:50,800 you want to delete 26 00:01:50,820 --> 00:01:55,990 and that works in the same way you find data to output but for updating, we got some separate operators 27 00:01:56,080 --> 00:01:58,620 and they will be covered in the update module. 28 00:01:58,960 --> 00:02:06,820 Now how do operators impact our data? That depends on the type, if we get a query operator like we'll 29 00:02:06,820 --> 00:02:10,150 use in this module, we can use it to locate data, 30 00:02:10,150 --> 00:02:13,370 it does not change our data and an example would be 31 00:02:13,390 --> 00:02:20,740 $eq for equal or $gt which you saw before. Projection operators which we'll also see in this module 32 00:02:21,010 --> 00:02:23,550 allow you to modify the data presentation, 33 00:02:23,620 --> 00:02:29,830 so the data you get back, this will also not change the data in the database though, only change the look 34 00:02:29,830 --> 00:02:35,130 of it which you get. Here, dollar sign is an example, 35 00:02:35,190 --> 00:02:38,040 this will become clearer once we use projection operators, 36 00:02:38,040 --> 00:02:43,040 so in the end we just got some tools to control the look of the data we get back. 37 00:02:43,040 --> 00:02:48,840 Update operators which we'll cover in the update module allow you to modify and add additional data and 38 00:02:48,840 --> 00:02:52,070 this therefore does of course change the data. Inc, 39 00:02:52,160 --> 00:02:52,660 $inc 40 00:02:52,680 --> 00:02:57,900 is an example which will increment a field by one or any amount you specify 41 00:02:57,930 --> 00:03:00,570 and this is also something we'll also see in the update module of course. {"threads":[{"position":2653298,"start":0,"end":4861433,"connection":"open"},{"position":9202379,"start":4861434,"end":9722865,"connection":"open"}],"url":"https://mp4-b.udemycdn.com/2018-09-20_10-50-02-1c15b31c40b0e728a13b8f5286b323f7/WebHD_720p.mp4?secure=IfDIcnkO4PeJyPXMhf_T3Q%3D%3D%2C1609100677","method":"GET","port":443,"downloadSize":9722865,"headers":{"date":"Sun, 27 Dec 2020 15:57:03 GMT","content-type":"video/mp4","content-length":"9722865","connection":"close","x-amz-id-2":"J5GQxVFTt0DqqxVcmJJTFOPOCLSsyZBE/yeIY/cAmKtMIGjvIh6lTiSNyP63by36LIwR23OYl2U=","x-amz-request-id":"85371A0EA3F8F58C","x-amz-replication-status":"COMPLETED","last-modified":"Sun, 05 Jan 2020 07:49:21 GMT","etag":"\"6682f871d28db47e080468fe5939209f\"","x-amz-storage-class":"INTELLIGENT_TIERING","x-amz-version-id":"bZLmTx5SIrEGilNesN4Uhue8s5KbK_T7","expires":"Wed, 30 Dec 2020 19:28:52 GMT","x-77-nzt":"A7k73AGcNIGxuZhBU/XYZ//bqwsAj/Q6gY9xEO/8iA8A","x-edge-ip":"143.244.58.129","x-edge-pop":"pragueCZ","x-77-cache":"HIT","cache-control":"max-age=31536000","x-77-nzt-ray":"ZhZY6RSmLs0=","x-lb-ip":"185.152.65.83, 185.59.220.1","x-lb-pop":"pragueCZ, frankfurtDE","x-cache-lb":"HIT, MISS","x-age-lb":"764891","server":"CDN77-Turbo","accept-ranges":"bytes"}}