title
MongoDB Crash Course 2022

description
In this video, I will introduce you to MongoDB Atlas, the multi-cloud application data platform from MongoDB, and walk you through how to set up and connect to the database, loading sample data and performing CRUD operations. This video will provide you with a basic understanding and way to get started with MongoDB Atlas, but you will learn that there are a variety of other features and ways to interact with your data available, providing you the flexibility to interact in the way that best suits your needs. ▶ Register for MongoDB Atlas: https://www.mongodb.com/cloud/atlas/register?utm_campaign=traversy_media&utm_source=youtube&utm_medium=influencers&utm_term=atlas ▶ MongoDB Cheat Sheet: https://gist.github.com/codeSTACKr/53fd03c7f75d40d07797b8e4e47d78ec ▶ Check out this tutorial to see the 5 different ways to deploy a free database with MongoDB Atlas: https://www.mongodb.com/developer/article/5-different-ways-deploy-free-database-mongodb-atlas/?utm_campaign=traversy_media&utm_source=youtube&utm_medium=influencers&utm_term=atlas ▶ Join the MongoDB community: https://www.mongodb.com/community/forums/?utm_campaign=traversy_media&utm_source=youtube&utm_medium=influencers&utm_term=atlas ▶ MongoDB YouTube Channel: https://www.youtube.com/c/MongoDBofficial —------------------------------------------------ Presented By: ▶ Senior Developer Advocate at MongoDB - Jesse Hall aka codeSTACKr: https://youtube.com/codeSTACKr ▶ @codeSTACKr: https://twitter.com/codeSTACKr

detail
{'title': 'MongoDB Crash Course 2022', 'heatmap': [{'end': 397.548, 'start': 344.947, 'weight': 0.786}, {'end': 478.537, 'start': 456.122, 'weight': 0.717}], 'summary': 'The mongodb crash course 2022 covers updated content including misconceptions, document database nature, differences from relational databases, json and bson data storage, mongodb atlas, shell operations, find methods, atlas dashboard, aggregation pipeline, database integration, and getting started with mongodb, offering a comprehensive understanding for users.', 'chapters': [{'end': 344.526, 'segs': [{'end': 34.304, 'src': 'embed', 'start': 7.062, 'weight': 0, 'content': [{'end': 10.686, 'text': 'Welcome to this updated MongoDB crash course for 2022.', 'start': 7.062, 'duration': 3.624}, {'end': 13.969, 'text': 'Brad has done a couple of these MongoDB crash courses over the years.', 'start': 10.686, 'duration': 3.283}, {'end': 17.812, 'text': 'And since then, there have been some improvements and changes to MongoDB.', 'start': 14.329, 'duration': 3.483}, {'end': 21.516, 'text': "Since he's super busy, he's letting me create this crash course for him.", 'start': 18.353, 'duration': 3.163}, {'end': 24.099, 'text': 'And let me tell you, his studio is amazing.', 'start': 21.536, 'duration': 2.563}, {'end': 25.259, 'text': "I'm Jesse.", 'start': 24.739, 'duration': 0.52}, {'end': 27.521, 'text': "I'm a senior developer advocate at MongoDB.", 'start': 25.379, 'duration': 2.142}, {'end': 30.342, 'text': 'You might also know me from my YouTube channel, CodeStacker.', 'start': 27.901, 'duration': 2.441}, {'end': 34.304, 'text': 'And to be completely transparent, this video is sponsored by MongoDB.', 'start': 30.642, 'duration': 3.662}], 'summary': 'Updated mongodb crash course for 2022, created by senior developer advocate jesse, sponsored by mongodb.', 'duration': 27.242, 'max_score': 7.062, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU7062.jpg'}, {'end': 82.976, 'src': 'embed', 'start': 41.328, 'weight': 1, 'content': [{'end': 49.633, 'text': "So what is MongoDB? Well, a lot of times you'll hear MongoDB referred to as a NoSQL database, and that's not really the best way to reference it.", 'start': 41.328, 'duration': 8.305}, {'end': 54.756, 'text': 'Some think NoSQL means not SQL, but it actually means not only SQL.', 'start': 50.093, 'duration': 4.663}, {'end': 57.117, 'text': 'See, MongoDB can use SQL.', 'start': 55.096, 'duration': 2.021}, {'end': 59.679, 'text': 'SQL just stands for Structured Query Language.', 'start': 57.237, 'duration': 2.442}, {'end': 62.04, 'text': "It's just a language for querying data.", 'start': 59.859, 'duration': 2.181}, {'end': 66.483, 'text': 'You might also hear MongoDB referred to as a non-relational database.', 'start': 62.641, 'duration': 3.842}, {'end': 71.987, 'text': "And again, this isn't the best way to reference it because you can store relational data in MongoDB.", 'start': 66.903, 'duration': 5.084}, {'end': 75.13, 'text': "It's just stored differently than in a relational database.", 'start': 72.287, 'duration': 2.843}, {'end': 78.532, 'text': 'So MongoDB is actually a document database.', 'start': 75.69, 'duration': 2.842}, {'end': 82.976, 'text': 'Data is stored in BSON under the hood, but is represented as JSON.', 'start': 78.933, 'duration': 4.043}], 'summary': 'Mongodb is a document database, not just nosql; can use sql and store relational data. uses bson represented as json.', 'duration': 41.648, 'max_score': 41.328, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU41328.jpg'}, {'end': 220.155, 'src': 'embed', 'start': 190.409, 'weight': 3, 'content': [{'end': 191.369, 'text': 'And this is by design.', 'start': 190.409, 'duration': 0.96}, {'end': 195.311, 'text': 'If you need a schema to add more structure, it can be added at any time.', 'start': 191.769, 'duration': 3.542}, {'end': 199.614, 'text': 'MongoDB databases scale very easily and are very cost effective.', 'start': 195.832, 'duration': 3.782}, {'end': 204.317, 'text': "They're also faster to query data in most operations over relational databases.", 'start': 200.054, 'duration': 4.263}, {'end': 210.928, 'text': 'You can install MongoDB locally, which will allow you to host your own MongoDB server on your hardware.', 'start': 204.983, 'duration': 5.945}, {'end': 215.231, 'text': 'This requires that you manage your server upgrades and any other maintenance.', 'start': 211.308, 'duration': 3.923}, {'end': 220.155, 'text': 'You can download and use the MongoDB open source community server on your hardware for free.', 'start': 215.771, 'duration': 4.384}], 'summary': 'Mongodb allows easy scaling, faster querying, and cost-effective hosting on own hardware.', 'duration': 29.746, 'max_score': 190.409, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU190409.jpg'}, {'end': 256.85, 'src': 'embed', 'start': 228.922, 'weight': 4, 'content': [{'end': 234.226, 'text': 'This takes all of the hassle of hosting your own server away so that you can focus on more important tasks.', 'start': 228.922, 'duration': 5.304}, {'end': 237.067, 'text': 'MongoDB Atlas has a generous free tier.', 'start': 234.726, 'duration': 2.341}, {'end': 240.127, 'text': 'Just go to mongodb.com and click try free.', 'start': 237.367, 'duration': 2.76}, {'end': 241.927, 'text': "And there's no credit card required.", 'start': 240.467, 'duration': 1.46}, {'end': 244.348, 'text': 'The direct link is in the description below as well.', 'start': 242.227, 'duration': 2.121}, {'end': 247.508, 'text': 'Just fill out the short form or use your Google account to sign up.', 'start': 244.708, 'duration': 2.8}, {'end': 250.589, 'text': "Next we'll choose the type of cluster that we want to create.", 'start': 248.069, 'duration': 2.52}, {'end': 253.47, 'text': 'We can choose between serverless, dedicated, or shared.', 'start': 250.949, 'duration': 2.521}, {'end': 256.85, 'text': 'Serverless instances are a pay-as-you-go type of plan.', 'start': 253.87, 'duration': 2.98}], 'summary': 'Mongodb atlas offers a hassle-free hosting solution with a generous free tier and pay-as-you-go serverless instances.', 'duration': 27.928, 'max_score': 228.922, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU228922.jpg'}, {'end': 314.458, 'src': 'embed', 'start': 284.34, 'weight': 5, 'content': [{'end': 287.422, 'text': 'And now our cluster is being created, and this usually just takes a few minutes.', 'start': 284.34, 'duration': 3.082}, {'end': 293.867, 'text': "Now out of the box, MongoDB Atlas is completely locked down, so you'll first need to enable access.", 'start': 288.003, 'duration': 5.864}, {'end': 296.949, 'text': 'First, in the left menu, select Database Access.', 'start': 294.387, 'duration': 2.562}, {'end': 299.852, 'text': "We'll create a new user with password authentication.", 'start': 297.37, 'duration': 2.482}, {'end': 305.254, 'text': 'you can choose a username and password or let atlas auto generate a secure password.', 'start': 300.612, 'duration': 4.642}, {'end': 314.458, 'text': "we'll allow the new user to read and write to any database and we can even restrict a user's access to specific clusters or make the user a temporary user.", 'start': 305.254, 'duration': 9.204}], 'summary': 'Creating a mongodb atlas cluster takes a few minutes. mongodb atlas is locked down by default. creating a new user involves selecting database access, creating a user with password authentication, and setting access permissions.', 'duration': 30.118, 'max_score': 284.34, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU284340.jpg'}], 'start': 7.062, 'title': 'Mongodb crash course 2022', 'summary': 'Introduces an updated mongodb crash course for 2022, covering misconceptions, document database nature, differences from relational databases, and providing a good understanding for getting started using mongodb. it also explains mongodb data storage in json and bson formats, flexible storage, easy scalability, cost-effective operations, mongodb atlas, cluster types, hosting options, free tier, and secure access management.', 'chapters': [{'end': 124.669, 'start': 7.062, 'title': 'Mongodb crash course 2022', 'summary': 'Introduces an updated mongodb crash course for 2022, presented by jesse, a senior developer advocate at mongodb, covering the misconceptions about mongodb, its document database nature, and the differences from relational databases, offering a good understanding for getting started using mongodb.', 'duration': 117.607, 'highlights': ['Jesse, a senior developer advocate at MongoDB, presents an updated MongoDB crash course for 2022', 'MongoDB is a document database, storing data in BSON under the hood and represented as JSON, differing fundamentally from relational databases', 'Misconceptions about MongoDB being a NoSQL or non-relational database are clarified, emphasizing its ability to store relational data and utilize SQL']}, {'end': 344.526, 'start': 125.31, 'title': 'Mongodb: data storage and access', 'summary': 'Explains how mongodb stores data in json and bson formats, allowing for flexible data storage, easy scalability, and cost-effective operations. mongodb atlas is a cloud database platform that provides various options for cluster types and hosting, with a generous free tier and secure access management.', 'duration': 219.216, 'highlights': ['MongoDB databases are flexible and do not have a default schema, allowing storage of any type of data in any document, and can easily scale with cost-effective operations over relational databases. Flexibility of MongoDB databases with no default schema and cost-effective operations over relational databases.', 'MongoDB Atlas offers various cluster types including serverless, dedicated, and shared, with options for different cloud providers and regions, and provides generous free tier and secure access management. Options and features offered by MongoDB Atlas including various cluster types, cloud provider options, and secure access management.', 'Explanation of how MongoDB Atlas requires enabling access through creating a new user with password authentication, allowing access from specific IP addresses, and the security risks of allowing access from anywhere. Enabling access in MongoDB Atlas through creating new user, IP address management, and security considerations.']}], 'duration': 337.464, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU7062.jpg', 'highlights': ['Jesse, a senior developer advocate at MongoDB, presents an updated MongoDB crash course for 2022', 'Misconceptions about MongoDB being a NoSQL or non-relational database are clarified, emphasizing its ability to store relational data and utilize SQL', 'MongoDB is a document database, storing data in BSON under the hood and represented as JSON, differing fundamentally from relational databases', 'MongoDB databases are flexible and do not have a default schema, allowing storage of any type of data in any document, and can easily scale with cost-effective operations over relational databases', 'MongoDB Atlas offers various cluster types including serverless, dedicated, and shared, with options for different cloud providers and regions, and provides generous free tier and secure access management', 'Explanation of how MongoDB Atlas requires enabling access through creating a new user with password authentication, allowing access from specific IP addresses, and the security risks of allowing access from anywhere']}, {'end': 574.181, 'segs': [{'end': 397.548, 'src': 'heatmap', 'start': 344.947, 'weight': 0.786, 'content': [{'end': 350.831, 'text': 'Generally, this IP address should be the one for any production servers or services that will be accessing the database.', 'start': 344.947, 'duration': 5.884}, {'end': 353.213, 'text': "And now it's time to connect to our database.", 'start': 350.992, 'duration': 2.221}, {'end': 356.536, 'text': "First, I'm going to show you how to connect using the MongoDB shell.", 'start': 353.494, 'duration': 3.042}, {'end': 358.958, 'text': "There's a link in the description to this install page.", 'start': 356.836, 'duration': 2.122}, {'end': 364.103, 'text': 'you can install the mongo shell following the installation instructions for your operating system.', 'start': 359.278, 'duration': 4.825}, {'end': 367.086, 'text': "after you've installed it, you'll be able to perform some crud operations.", 'start': 364.103, 'duration': 2.983}, {'end': 372.152, 'text': "now cred stands for create, read, update and delete, and first we'll need to connect to our database.", 'start': 367.086, 'duration': 5.066}, {'end': 378.599, 'text': "let's go to connect in our atlas dashboard and select connect with the mongo shell and now copy the connection string.", 'start': 372.152, 'duration': 6.447}, {'end': 380.099, 'text': "Now let's open our terminal.", 'start': 379.139, 'duration': 0.96}, {'end': 381.8, 'text': 'You can use any terminal that you want.', 'start': 380.2, 'duration': 1.6}, {'end': 383.841, 'text': "I'm using git bash inside vs code.", 'start': 381.88, 'duration': 1.961}, {'end': 387.443, 'text': "Now to be sure the mongo shell is installed properly, let's check the version.", 'start': 384.241, 'duration': 3.202}, {'end': 391.525, 'text': "So we're going to type mongo sh dash dash version.", 'start': 387.463, 'duration': 4.062}, {'end': 397.548, 'text': "You can see I'm using version 1.1.7, which is the latest as of the recording of this video.", 'start': 392.125, 'duration': 5.423}], 'summary': 'Connecting to mongodb using mongo shell, version 1.1.7 latest as of recording.', 'duration': 52.601, 'max_score': 344.947, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU344947.jpg'}, {'end': 391.525, 'src': 'embed', 'start': 364.103, 'weight': 0, 'content': [{'end': 367.086, 'text': "after you've installed it, you'll be able to perform some crud operations.", 'start': 364.103, 'duration': 2.983}, {'end': 372.152, 'text': "now cred stands for create, read, update and delete, and first we'll need to connect to our database.", 'start': 367.086, 'duration': 5.066}, {'end': 378.599, 'text': "let's go to connect in our atlas dashboard and select connect with the mongo shell and now copy the connection string.", 'start': 372.152, 'duration': 6.447}, {'end': 380.099, 'text': "Now let's open our terminal.", 'start': 379.139, 'duration': 0.96}, {'end': 381.8, 'text': 'You can use any terminal that you want.', 'start': 380.2, 'duration': 1.6}, {'end': 383.841, 'text': "I'm using git bash inside vs code.", 'start': 381.88, 'duration': 1.961}, {'end': 387.443, 'text': "Now to be sure the mongo shell is installed properly, let's check the version.", 'start': 384.241, 'duration': 3.202}, {'end': 391.525, 'text': "So we're going to type mongo sh dash dash version.", 'start': 387.463, 'duration': 4.062}], 'summary': 'Learn to perform crud operations after installing and connecting to the database, using mongo shell to check the version.', 'duration': 27.422, 'max_score': 364.103, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU364103.jpg'}, {'end': 482.22, 'src': 'heatmap', 'start': 440.367, 'weight': 2, 'content': [{'end': 446.232, 'text': 'If we want to use a different database or even create a new one, we can type use and then the database name.', 'start': 440.367, 'duration': 5.865}, {'end': 448.955, 'text': "So we'll create a new database called blog.", 'start': 446.252, 'duration': 2.703}, {'end': 453.559, 'text': 'And again, this database is not actually created until we insert some data into it.', 'start': 449.555, 'duration': 4.004}, {'end': 455.541, 'text': 'Next we need to create a collection.', 'start': 454.139, 'duration': 1.402}, {'end': 461.751, 'text': 'We can specifically create a collection by using db.createCollection and then the collection name.', 'start': 456.122, 'duration': 5.629}, {'end': 465.156, 'text': 'Or we could just create the collection on the fly as we insert data.', 'start': 462.271, 'duration': 2.885}, {'end': 471.51, 'text': 'So to create or insert a document, we can either use the insert one or insert many methods.', 'start': 465.785, 'duration': 5.725}, {'end': 475.414, 'text': "So let's do db.posts.insert1.", 'start': 472.151, 'duration': 3.263}, {'end': 478.537, 'text': "Now db is the database that we're using.", 'start': 475.734, 'duration': 2.803}, {'end': 482.22, 'text': "Posts is the collection, and if it doesn't exist, it will be created.", 'start': 478.937, 'duration': 3.283}], 'summary': "Creating a new database 'blog' and a collection 'posts' in mongodb.", 'duration': 41.853, 'max_score': 440.367, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU440367.jpg'}, {'end': 541.685, 'src': 'embed', 'start': 511.243, 'weight': 1, 'content': [{'end': 513.284, 'text': 'So I have an array here with more post objects.', 'start': 511.243, 'duration': 2.041}, {'end': 516.299, 'text': "So I'm going to paste that in.", 'start': 515.299, 'duration': 1}, {'end': 519.203, 'text': 'So now we can see that it inserted all of these documents.', 'start': 516.9, 'duration': 2.303}, {'end': 524.309, 'text': 'But how do we actually see the documents? We can use db.posts.find.', 'start': 519.443, 'duration': 4.866}, {'end': 528.393, 'text': 'So find is going to find all of the documents in this collection.', 'start': 524.789, 'duration': 3.604}, {'end': 534.88, 'text': "If we wanted to narrow it down, we could pass an object inside of find, which is going to define what we're looking for.", 'start': 528.853, 'duration': 6.027}, {'end': 537.202, 'text': "So let's say category of news.", 'start': 535.14, 'duration': 2.062}, {'end': 541.685, 'text': "So now it's only going to show us all of the documents that have a category of news.", 'start': 537.662, 'duration': 4.023}], 'summary': 'Inserting and finding documents in a collection using mongodb.', 'duration': 30.442, 'max_score': 511.243, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU511243.jpg'}], 'start': 344.947, 'title': 'Mongodb shell and database management', 'summary': 'Covers connecting to mongodb using the shell, performing crud operations, and checking the version (1.1.7). it also explains managing databases and collections, including creating, inserting, querying, and sorting data.', 'chapters': [{'end': 404.931, 'start': 344.947, 'title': 'Connecting to mongodb shell', 'summary': 'Explains how to connect to a mongodb database using the mongodb shell, including installation instructions, performing crud operations, and checking the version, with the latest version being 1.1.7.', 'duration': 59.984, 'highlights': ['The chapter explains how to connect to a MongoDB database using the MongoDB shell, including installation instructions, performing CRUD operations, and checking the version, with the latest version being 1.1.7.', 'MongoDB shell version 1.1.7 is the latest as of the recording of this video.', 'The tutorial includes instructions for installing the mongo shell for different operating systems, allowing users to connect to the database and perform CRUD operations.']}, {'end': 574.181, 'start': 405.291, 'title': 'Managing mongodb databases and collections', 'summary': 'Covers the basics of managing mongodb databases and collections, including creating databases, collections, inserting documents, querying data, and applying sorting and limiting methods.', 'duration': 168.89, 'highlights': ["We can see what database we're using by typing db. It shows my first database and we can see all of the available databases by typing show dbs. The speaker demonstrates how to view the current database and all available databases using 'db' and 'show dbs' commands.", "We can specifically create a collection by using db.createCollection and then the collection name. Or we could just create the collection on the fly as we insert data. The process of creating a collection in MongoDB is outlined, where it can be explicitly created using 'db.createCollection' or created dynamically while inserting data.", "We can use db.posts.find to find all of the documents in this collection. If we wanted to narrow it down, we could pass an object inside of find, which is going to define what we're looking for. The method for querying and filtering documents in a collection is explained, demonstrating the usage of 'db.posts.find' and passing objects to narrow down search results."]}], 'duration': 229.234, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU344947.jpg', 'highlights': ['The tutorial includes instructions for installing the mongo shell for different operating systems, allowing users to connect to the database and perform CRUD operations.', "The method for querying and filtering documents in a collection is explained, demonstrating the usage of 'db.posts.find' and passing objects to narrow down search results.", 'We can specifically create a collection by using db.createCollection and then the collection name. Or we could just create the collection on the fly as we insert data.']}, {'end': 869.352, 'segs': [{'end': 634.697, 'src': 'embed', 'start': 574.662, 'weight': 0, 'content': [{'end': 579.947, 'text': "So if we do a find on everything, but limit the two, it's only going to return the first two documents that it finds.", 'start': 574.662, 'duration': 5.285}, {'end': 583.369, 'text': 'And just like in JavaScript, we can chain on multiple methods.', 'start': 580.547, 'duration': 2.822}, {'end': 586.87, 'text': 'Now similar to find is another method called find one.', 'start': 583.769, 'duration': 3.101}, {'end': 589.152, 'text': 'Now find one is pretty self-explanatory.', 'start': 586.89, 'duration': 2.262}, {'end': 591.193, 'text': "It's going to return the first match.", 'start': 589.232, 'duration': 1.961}, {'end': 597.456, 'text': 'So for find one, we would want to put some sort of a parameter to search for, or we could use one of the many operators.', 'start': 591.573, 'duration': 5.883}, {'end': 601.139, 'text': "Let's find the first post with likes greater than three.", 'start': 597.856, 'duration': 3.283}, {'end': 608.406, 'text': 'And we also have GTE, which is greater than or equal to LT and LTE, which is less than and less than or equal to.', 'start': 601.159, 'duration': 7.247}, {'end': 611.869, 'text': 'So it should return to us post four, which has four likes.', 'start': 608.907, 'duration': 2.962}, {'end': 617.274, 'text': 'Now to update an existing document, we can use the update one or update many methods.', 'start': 612.37, 'duration': 4.904}, {'end': 623.04, 'text': "So let's do db.post.find and let's look for the document that has the title of post one.", 'start': 617.655, 'duration': 5.385}, {'end': 627.292, 'text': 'So we can see that this one has one in the likes field.', 'start': 624.65, 'duration': 2.642}, {'end': 628.352, 'text': "Let's update that.", 'start': 627.612, 'duration': 0.74}, {'end': 631.014, 'text': "So let's say db.posts.update1.", 'start': 628.513, 'duration': 2.501}, {'end': 634.697, 'text': "And now the first parameter is gonna be the criteria that we're searching for.", 'start': 631.435, 'duration': 3.262}], 'summary': 'The transcript explains using mongodb methods like find, findone, updateone, and updatemany with examples and operators, such as greater than or equal to, and less than or equal to.', 'duration': 60.035, 'max_score': 574.662, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU574662.jpg'}, {'end': 685.3, 'src': 'embed', 'start': 654.99, 'weight': 4, 'content': [{'end': 660.554, 'text': 'In previous versions, this would have replaced the entire document with likes two and erased all of the other data.', 'start': 654.99, 'duration': 5.564}, {'end': 666.718, 'text': "If you want to update just a specific field and keep the rest, we'll need to use the dollar set operator.", 'start': 661.254, 'duration': 5.464}, {'end': 668.579, 'text': "So let's do update one again.", 'start': 667.158, 'duration': 1.421}, {'end': 670.32, 'text': "We're going to use dollar set.", 'start': 668.599, 'duration': 1.721}, {'end': 678.109, 'text': "Within dollar set, we're going to pass the category and we're going to change it to tech now, before the category was event.", 'start': 670.64, 'duration': 7.469}, {'end': 685.3, 'text': "so let's do a db find on this one and now we can see that it is set to tech and the rest of the data is still there.", 'start': 678.109, 'duration': 7.191}], 'summary': 'Using dollar set, updated category to tech from event, keeping rest of data intact.', 'duration': 30.31, 'max_score': 654.99, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU654990.jpg'}, {'end': 832.288, 'src': 'embed', 'start': 809.19, 'weight': 5, 'content': [{'end': 816.876, 'text': "Now to delete everything in the collection, we could do db.post.deleteMany and pass in an empty object, but I don't want to do that.", 'start': 809.19, 'duration': 7.686}, {'end': 822.821, 'text': "So I'm going to put in here category of tech, and now it's going to delete every document that has a category of tech.", 'start': 817.036, 'duration': 5.785}, {'end': 823.962, 'text': 'All right.', 'start': 823.701, 'duration': 0.261}, {'end': 828.565, 'text': 'Now I want to show you back in our Atlas dashboard, we can go to browse collections.', 'start': 823.982, 'duration': 4.583}, {'end': 832.288, 'text': "You can see all of the collections and documents that we've added.", 'start': 828.585, 'duration': 3.703}], 'summary': 'Using db.post.deletemany to delete documents with category of tech.', 'duration': 23.098, 'max_score': 809.19, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU809190.jpg'}, {'end': 877.817, 'src': 'embed', 'start': 849.852, 'weight': 6, 'content': [{'end': 854.053, 'text': 'I could go here and edit this document and I could filter documents.', 'start': 849.852, 'duration': 4.201}, {'end': 856.753, 'text': 'But I want to add some more data for us to use.', 'start': 854.753, 'duration': 2}, {'end': 859.394, 'text': "So we're going to load some sample data into our database.", 'start': 856.773, 'duration': 2.621}, {'end': 861.554, 'text': "So I'm going to go back to databases.", 'start': 859.894, 'duration': 1.66}, {'end': 865.935, 'text': "So then here on the three dots, we'll click that and then load sample data set.", 'start': 861.954, 'duration': 3.981}, {'end': 869.352, 'text': "And we're going to load that sample data set and it's going to take a few minutes.", 'start': 866.65, 'duration': 2.702}, {'end': 874.455, 'text': "So while that's loading, let's take a look at another way to connect to our MongoDB Atlas database.", 'start': 869.992, 'duration': 4.463}, {'end': 877.817, 'text': "We're going to take a look at Compass, the GUI for MongoDB.", 'start': 874.975, 'duration': 2.842}], 'summary': 'Loading sample data into database, exploring connection via compass gui for mongodb.', 'duration': 27.965, 'max_score': 849.852, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU849852.jpg'}], 'start': 574.662, 'title': 'Mongodb find methods and managing data', 'summary': 'Explains mongodb find and find one methods, with examples of limiting results and using comparison operators. it also covers updating and deleting documents using update one, update many, delete one, and delete many methods, along with managing data in the atlas dashboard and loading sample data into the database.', 'chapters': [{'end': 611.869, 'start': 574.662, 'title': 'Mongodb find methods', 'summary': 'Explains the find and find one methods in mongodb, including their use cases and examples, such as limiting results and using comparison operators to filter data, with a specific example returning a post with likes greater than three.', 'duration': 37.207, 'highlights': ['The find method in MongoDB can be used to limit the number of documents returned, such as returning only the first two documents.', 'The find one method in MongoDB returns the first match based on the specified parameter or operators, such as likes greater than three.', 'MongoDB provides comparison operators like GTE (greater than or equal to) and LT (less than) to filter data based on specific conditions.']}, {'end': 869.352, 'start': 612.37, 'title': 'Updating, deleting, and managing data in mongodb', 'summary': 'Covers updating existing documents using methods like update one and update many, demonstrating the use of operators like $set and $inc to update specific fields and increment numbers, followed by deleting documents using delete one and delete many methods, with examples of deleting specific documents and all documents with a certain category, and concludes with a mention of managing data in the atlas dashboard and loading sample data into the database.', 'duration': 256.982, 'highlights': ['The chapter covers updating existing documents using methods like update one and update many Demonstrates the methods for updating existing documents in MongoDB.', 'Demonstrating the use of operators like $set and $inc to update specific fields and increment numbers Shows the usage of $set and $inc operators to update specific fields and increment numbers in MongoDB.', 'Examples of deleting specific documents and all documents with a certain category Illustrates the process of deleting specific documents and all documents with a specific category in MongoDB.', 'Mention of managing data in the Atlas dashboard and loading sample data into the database Concludes with a mention of managing data in the Atlas dashboard and loading sample data into the database.']}], 'duration': 294.69, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU574662.jpg', 'highlights': ['The find method in MongoDB can be used to limit the number of documents returned, such as returning only the first two documents.', 'The find one method in MongoDB returns the first match based on the specified parameter or operators, such as likes greater than three.', 'MongoDB provides comparison operators like GTE (greater than or equal to) and LT (less than) to filter data based on specific conditions.', 'The chapter covers updating existing documents using methods like update one and update many Demonstrates the methods for updating existing documents in MongoDB.', 'Demonstrating the use of operators like $set and $inc to update specific fields and increment numbers Shows the usage of $set and $inc operators to update specific fields and increment numbers in MongoDB.', 'Examples of deleting specific documents and all documents with a certain category Illustrates the process of deleting specific documents and all documents with a specific category in MongoDB.', 'Mention of managing data in the Atlas dashboard and loading sample data into the database Concludes with a mention of managing data in the Atlas dashboard and loading sample data into the database.']}, {'end': 1194.241, 'segs': [{'end': 897.429, 'src': 'embed', 'start': 869.992, 'weight': 0, 'content': [{'end': 874.455, 'text': "So while that's loading, let's take a look at another way to connect to our MongoDB Atlas database.", 'start': 869.992, 'duration': 4.463}, {'end': 877.817, 'text': "We're going to take a look at Compass, the GUI for MongoDB.", 'start': 874.975, 'duration': 2.842}, {'end': 880.498, 'text': "Now there's a link in the description to install Compass.", 'start': 877.837, 'duration': 2.661}, {'end': 882.8, 'text': "It's free and it works on Windows, Mac, and Linux.", 'start': 880.538, 'duration': 2.262}, {'end': 885.361, 'text': "So to connect to it, we're going to need a connection string.", 'start': 883.34, 'duration': 2.021}, {'end': 886.402, 'text': "So let's go back to Atlas.", 'start': 885.481, 'duration': 0.921}, {'end': 888.103, 'text': "And let's click connect.", 'start': 887.122, 'duration': 0.981}, {'end': 891.225, 'text': "And then we're going to connect using MongoDB Compass.", 'start': 888.503, 'duration': 2.722}, {'end': 893.846, 'text': "So let's copy this connection string.", 'start': 892.285, 'duration': 1.561}, {'end': 897.429, 'text': "This is the first thing you'll see after you install Compass and open it up.", 'start': 894.367, 'duration': 3.062}], 'summary': 'Learn how to connect to mongodb atlas using compass, a free gui for windows, mac, and linux.', 'duration': 27.437, 'max_score': 869.992, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU869992.jpg'}, {'end': 976.146, 'src': 'embed', 'start': 933.277, 'weight': 2, 'content': [{'end': 934.318, 'text': "Just don't worry about those.", 'start': 933.277, 'duration': 1.041}, {'end': 935.838, 'text': 'You should never have to mess with them.', 'start': 934.378, 'duration': 1.46}, {'end': 939.029, 'text': 'All right, so it looks like our sample data has finished loading.', 'start': 936.769, 'duration': 2.26}, {'end': 940.67, 'text': 'Also check this out.', 'start': 939.63, 'duration': 1.04}, {'end': 944.911, 'text': 'We have built into Compass the Mongo shell, just like we looked at earlier.', 'start': 940.79, 'duration': 4.121}, {'end': 946.071, 'text': "That's super convenient.", 'start': 945.031, 'duration': 1.04}, {'end': 948.652, 'text': 'We have a sample Airbnb database.', 'start': 946.411, 'duration': 2.241}, {'end': 949.412, 'text': "Let's click on that.", 'start': 948.672, 'duration': 0.74}, {'end': 952.832, 'text': 'And in here we have the collection listings and reviews.', 'start': 949.972, 'duration': 2.86}, {'end': 957.033, 'text': 'This contains a bunch of rental listings like Airbnb.', 'start': 953.453, 'duration': 3.58}, {'end': 959.814, 'text': 'So let me show you the power of aggregations.', 'start': 957.493, 'duration': 2.321}, {'end': 962.958, 'text': "So we're gonna go over here to the aggregations tab.", 'start': 960.677, 'duration': 2.281}, {'end': 968.782, 'text': 'An aggregation pipeline allows us not only to search our data, but transform it on the fly.', 'start': 963.559, 'duration': 5.223}, {'end': 976.146, 'text': 'We can group, sort, filter, create new fields, perform math operations, project only the fields needed, and so much more.', 'start': 969.122, 'duration': 7.024}], 'summary': 'Compass has finished loading sample data, including airbnb listings and reviews, showcasing the power of aggregations for data manipulation.', 'duration': 42.869, 'max_score': 933.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU933277.jpg'}], 'start': 869.992, 'title': 'Mongodb atlas and aggregation pipeline', 'summary': 'Covers connecting to mongodb atlas using compass, including installation, connection, and database interaction. it also explains using aggregation pipeline to filter rental listings based on specific criteria and limit the displayed fields to 20.', 'chapters': [{'end': 952.832, 'start': 869.992, 'title': 'Connecting to mongodb atlas with compass', 'summary': 'Demonstrates how to connect to mongodb atlas using compass, a gui for mongodb, providing a step-by-step guide on installation, connection, and database interaction, with features such as viewing and querying data, creating databases and collections, analyzing indexes, and utilizing the mongo shell.', 'duration': 82.84, 'highlights': ['Compass provides the capability to view and query data, create databases and collections, and analyze indexes, offering a comprehensive approach to database management.', 'A step-by-step guide is presented on connecting to MongoDB Atlas using Compass, including the installation process and entering the connection string.', 'Compass allows the user to interact with a sample Airbnb database, providing access to collections such as listings and reviews.', 'The tutorial emphasizes the convenience of utilizing the built-in Mongo shell within Compass for seamless database management.', 'Compass is highlighted as a free, multi-platform tool that works on Windows, Mac, and Linux, making it accessible to a wide range of users.']}, {'end': 1194.241, 'start': 953.453, 'title': 'Aggregation pipeline for rental listings', 'summary': 'Explains how to use aggregation pipeline to filter rental listings with more than 4 accommodations, a price lower than $500, and specific amenities, then sort the results by price and limit the fields to be displayed to 20.', 'duration': 240.788, 'highlights': ['An aggregation pipeline allows transforming data on the fly by grouping, sorting, filtering, creating new fields, performing math operations, and projecting only the necessary fields, providing powerful capabilities for data manipulation.', 'The aggregation pipeline is utilized to filter rental listings, first by accommodations greater than 4, then by price less than $500, and finally by the presence of specific amenities like a hair dryer.', 'Sorting the results by price in ascending order enables displaying the lowest-priced listings first, followed by limiting the fields to be sent to the front-end application, optimizing the data transfer and improving performance.']}], 'duration': 324.249, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU869992.jpg', 'highlights': ['Compass provides comprehensive database management capabilities.', 'Step-by-step guide on connecting to MongoDB Atlas using Compass.', 'Aggregation pipeline allows powerful data transformation and manipulation.', 'Utilizing aggregation pipeline to filter rental listings based on specific criteria.', 'Utilizing built-in Mongo shell within Compass for seamless database management.']}, {'end': 1615.659, 'segs': [{'end': 1233.742, 'src': 'embed', 'start': 1194.261, 'weight': 0, 'content': [{'end': 1200.587, 'text': 'All right, so now that we have this aggregation pipeline built, we can export this pipeline to a specific language.', 'start': 1194.261, 'duration': 6.326}, {'end': 1203.389, 'text': 'So we can pick here which language we want to export to.', 'start': 1201.087, 'duration': 2.302}, {'end': 1205.932, 'text': 'We have Java, Node, C Sharp, and Python.', 'start': 1203.529, 'duration': 2.403}, {'end': 1209.475, 'text': "So we'll select Node, and let's copy this because we're going to use it a little bit later.", 'start': 1206.252, 'duration': 3.223}, {'end': 1213.156, 'text': 'All right, now I want to connect to our data in another application.', 'start': 1209.775, 'duration': 3.381}, {'end': 1216.237, 'text': "We're going to use the MongoDB extension for VS Code.", 'start': 1213.216, 'duration': 3.021}, {'end': 1219.838, 'text': 'So in VS Code, just search for the extension MongoDB for VS Code.', 'start': 1216.517, 'duration': 3.321}, {'end': 1221.959, 'text': 'And this is an official MongoDB extension.', 'start': 1219.858, 'duration': 2.101}, {'end': 1223.159, 'text': "And let's install that.", 'start': 1222.339, 'duration': 0.82}, {'end': 1227.18, 'text': "After it's installed, in our sidebar, we should see this MongoDB leaf.", 'start': 1223.959, 'duration': 3.221}, {'end': 1228.841, 'text': 'And we can add a connection.', 'start': 1227.521, 'duration': 1.32}, {'end': 1231.262, 'text': "So let's connect using a connection string.", 'start': 1229.121, 'duration': 2.141}, {'end': 1232.482, 'text': "And we'll need to paste that in.", 'start': 1231.462, 'duration': 1.02}, {'end': 1233.742, 'text': "So let's go back to Atlas.", 'start': 1232.502, 'duration': 1.24}], 'summary': 'Aggregation pipeline exported to node for mongodb vs code extension connection.', 'duration': 39.481, 'max_score': 1194.261, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU1194261.jpg'}, {'end': 1610.817, 'src': 'embed', 'start': 1580.779, 'weight': 2, 'content': [{'end': 1583.681, 'text': "So it's pretty easy to integrate MongoDB into your application.", 'start': 1580.779, 'duration': 2.902}, {'end': 1587.624, 'text': 'So we looked at how to get started with MongoDB using MongoDB Atlas.', 'start': 1584.062, 'duration': 3.562}, {'end': 1590.026, 'text': 'We learned different ways to connect to our database.', 'start': 1587.764, 'duration': 2.262}, {'end': 1594.429, 'text': 'We used the Mongo shell, Compass, VS Code, and our own Node.js app.', 'start': 1590.286, 'duration': 4.143}, {'end': 1598.813, 'text': 'We covered how to perform CRUD operations and dove into aggregation pipelines.', 'start': 1594.75, 'duration': 4.063}, {'end': 1602.674, 'text': "And this is just scratching the surface of what's possible with MongoDB.", 'start': 1599.213, 'duration': 3.461}, {'end': 1606.696, 'text': 'You should now know enough to get started using MongoDB in your next project.', 'start': 1603.114, 'duration': 3.582}, {'end': 1610.817, 'text': 'If you have any questions or issues, go to community.mongodb.com.', 'start': 1606.956, 'duration': 3.861}], 'summary': "Integrate mongodb easily, covering crud operations and aggregation pipelines using various tools like mongo shell, compass, vs code, and node.js. it's just the beginning of what's possible with mongodb.", 'duration': 30.038, 'max_score': 1580.779, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU1580779.jpg'}], 'start': 1194.261, 'title': 'Mongodb integration and getting started', 'summary': 'Introduces the process of exporting aggregation pipelines to different languages, setting up mongodb extension in vs code, connecting to a database, and utilizing the playground for database queries. it also covers connecting to mongodb using vs code and node.js, performing crud operations, and using aggregation pipelines, providing guidance on getting started with mongodb and its potential.', 'chapters': [{'end': 1346.003, 'start': 1194.261, 'title': 'Mongodb vs code integration', 'summary': 'Introduces the process of exporting aggregation pipelines to different languages, setting up mongodb extension in vs code, connecting to a database, and utilizing the playground for database queries.', 'duration': 151.742, 'highlights': ['The chapter explains the process of exporting aggregation pipelines to different languages including Java, Node, C Sharp, and Python. The user is able to export the aggregation pipeline to specific languages such as Java, Node, C Sharp, and Python.', 'Instructions are provided for setting up the MongoDB extension in VS Code and connecting to a database using a connection string. The user is guided on setting up the MongoDB extension in VS Code and connecting to a database using a connection string.', 'The chapter demonstrates the functionality of the MongoDB extension in VS Code for viewing databases, collections, and documents, as well as creating new databases, collections, and documents. The MongoDB extension in VS Code allows users to view databases, collections, and documents, as well as create new ones.', 'The chapter showcases the utilization of the playground in VS Code for performing database queries and running aggregation pipelines. The playground in VS Code enables users to perform database queries, including running aggregation pipelines.']}, {'end': 1615.659, 'start': 1346.003, 'title': 'Getting started with mongodb', 'summary': 'Covers connecting to mongodb using vs code and node.js, performing crud operations, and using aggregation pipelines, providing guidance on getting started with mongodb and its potential.', 'duration': 269.656, 'highlights': ['Using MongoDB in an application with Node.js Demonstrates the ease of using MongoDB in an application with Node.js, providing a comprehensive guide on connecting and performing operations with MongoDB in Node.js.', 'Connecting to MongoDB using VS Code Highlights the process of connecting to MongoDB using VS Code, showcasing the simplicity and convenience of working with MongoDB directly within VS Code.', 'Performing CRUD operations and aggregation pipelines Covers the process of performing CRUD operations and delving into aggregation pipelines, offering practical insights into manipulating data within MongoDB and exploring its capabilities.']}], 'duration': 421.398, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2QQGWYe7IDU/pics/2QQGWYe7IDU1194261.jpg', 'highlights': ['The chapter explains the process of exporting aggregation pipelines to different languages including Java, Node, C Sharp, and Python.', 'Instructions are provided for setting up the MongoDB extension in VS Code and connecting to a database using a connection string.', 'Using MongoDB in an application with Node.js Demonstrates the ease of using MongoDB in an application with Node.js, providing a comprehensive guide on connecting and performing operations with MongoDB in Node.js.', 'The chapter demonstrates the functionality of the MongoDB extension in VS Code for viewing databases, collections, and documents, as well as creating new databases, collections, and documents.']}], 'highlights': ['Misconceptions about MongoDB being a NoSQL or non-relational database are clarified, emphasizing its ability to store relational data and utilize SQL', 'MongoDB is a document database, storing data in BSON under the hood and represented as JSON, differing fundamentally from relational databases', 'MongoDB databases are flexible and do not have a default schema, allowing storage of any type of data in any document, and can easily scale with cost-effective operations over relational databases', 'MongoDB Atlas offers various cluster types including serverless, dedicated, and shared, with options for different cloud providers and regions, and provides generous free tier and secure access management', 'The tutorial includes instructions for installing the mongo shell for different operating systems, allowing users to connect to the database and perform CRUD operations', "The method for querying and filtering documents in a collection is explained, demonstrating the usage of 'db.posts.find' and passing objects to narrow down search results", 'The find method in MongoDB can be used to limit the number of documents returned, such as returning only the first two documents', 'The find one method in MongoDB returns the first match based on the specified parameter or operators, such as likes greater than three', 'MongoDB provides comparison operators like GTE (greater than or equal to) and LT (less than) to filter data based on specific conditions', 'The chapter covers updating existing documents using methods like update one and update many Demonstrates the methods for updating existing documents in MongoDB', 'Demonstrating the use of operators like $set and $inc to update specific fields and increment numbers Shows the usage of $set and $inc operators to update specific fields and increment numbers in MongoDB', 'Examples of deleting specific documents and all documents with a certain category Illustrates the process of deleting specific documents and all documents with a specific category in MongoDB', 'Compass provides comprehensive database management capabilities', 'Step-by-step guide on connecting to MongoDB Atlas using Compass', 'Aggregation pipeline allows powerful data transformation and manipulation', 'Utilizing aggregation pipeline to filter rental listings based on specific criteria', 'The chapter explains the process of exporting aggregation pipelines to different languages including Java, Node, C Sharp, and Python', 'Instructions are provided for setting up the MongoDB extension in VS Code and connecting to a database using a connection string', 'Using MongoDB in an application with Node.js Demonstrates the ease of using MongoDB in an application with Node.js, providing a comprehensive guide on connecting and performing operations with MongoDB in Node.js', 'The chapter demonstrates the functionality of the MongoDB extension in VS Code for viewing databases, collections, and documents, as well as creating new databases, collections, and documents']}