Intro to MongoDB Atlas in 10 mins | Jumpstart 2021

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we'll take a deeper look at mongodb atlas our database as a service platform i'll show you how to sign up create your first cluster load some sample data and view your data from a really cool vs code extension all for free hi i'm jesse i'm a senior developer advocate at mongodb welcome back to the mongodb jumpstart series in the previous video we got a high level overview of mongodb now let's take a closer look at atlas instead of maintaining your own server hardware to run mongodb why not just use mongodb atlas it's a fully managed cloud database the infrastructure provisioning database setup maintenance and version upgrades are fully automated with atlas you get multi-cloud data distribution you can distribute your data across over 75 cloud regions on amazon web services microsoft azure and google cloud you'll also get peace of mind that your data will be secure atlas has sophisticated security controls for data privacy and compliance atlas comes with all of the drivers and tools that you need to build apps faster along with atlas you'll get its entire ecosystem of services including atlas search atlas online archive atlas data lake and mongodb realm mongodb atlas has a generous free tier just go to mongodb.com and click get started there is no credit card required the direct link is in the description below as well just fill in the short form or use your google account to sign up at this point you can choose your organization name project name and your preferred coding language these are optional you can continue or skip we'll accept the defaults and choose javascript as our preferred language and click continue next we'll choose the type of database we want to create we can choose between serverless dedicated or shared serverless instances are currently in preview these allow you to only pay for the operations that you run and scaling is automatic depending on your workload dedicated is for production applications with advanced configuration needs with these you also have the options of multi-region and multi-cloud support shared is for learning and exploring mongodb it's completely free forever no credit card is required so let's choose that option to get us started next we can choose the cloud provider and region that we want our cluster to be deployed in optionally we can upgrade our cluster tier for a small monthly fee we can also turn on backups if we upgrade to at least an m2 cluster and finally we can choose our cluster name we'll just keep all the defaults and click create cluster now our cluster is being created this usually just takes a few minutes now that our cluster is created let's add some sample data this will take a few minutes to load while the data is loading let's change some settings so that we can access our data externally in the left menu go to database access and then click add new database user we're going to use password authentication and then we'll create a user i'll name mine and then we'll auto generate a secure password be sure to copy this for future reference we're going to allow our user to read and write any database and we can even restrict a user's access to specific clusters or make this user a temporary user in that case the user would be deleted after a specified duration automatically so let's add this user next let's go to network access and we're going to add an ip address this is going to prevent access to our cluster from any ip address that is not on our list so we can choose to add our current ip address or allow access from anywhere or we can enter a specific ip address or range we can also enable temporary ip access just like with users note that allowing access from anywhere is a security risk and should be avoided especially in production environments so let's click confirm here the sample data should be finished loading by now so back under databases let's take a look at our collections so we can click browse collections you'll see here that we have eight databases and 21 collections under the sample airbnb database we have a collection of listings and reviews you can quickly see here what's included in this collection along with all of its document fields and we can even filter directly in atlas to find specific documents so for example if we wanted to see listings that have more than three bedrooms we could enter a filter here so we'll say bedrooms that are greater than three so now our list is being filtered by any document that has more than three bedrooms so here this one has four this one has four and so on so now let's connect to our data in another application we're going to use the mongodb extension for vs code first we'll go back to databases and we're going to click connect then we'll choose connect using mongodb compass and we're going to copy this connection string even though we're not using compass right now this is the connection string that we need in vs code we're going to use the same connection string in our next video when we take a closer look at compass now in vs code install the mongodb for vs code extension once that's installed you'll see a new option on the sidebar a mongodb leaf go ahead and click that and then choose add connection and now we can click connect to use our connection string i'm going to paste in the connection string that we copied earlier and then we'll need to change password to our actual password right now we should see our cluster on the left side here we see airbnb we see our listings and reviews and we can even see our documents and we can open up one of those documents and see its contents from here we can even create a new database or even new collections there's also a playground we can create a new playground we can test all of our database queries here it even gives us a default template to get us started so if we look at this playground we see that it's using this database this database isn't in our current cluster so it's going to be created we can see that it's saying database and then dot sales which would be their collection drop so if it's there it's going to drop it and then we're going to insert mini we're going to insert all of these documents after that we're going to find a specific document where the date is greater than this specific date and less than this date and then we're going to build this aggregation so we're going to match on the dates and then group them and calculate a total sale amount lastly we're going to call database dot sales dot aggregate and run our aggregation so let's go ahead and run this and see what it does so now we're being asked if we actually want to run this because it is going to run on our cluster this isn't just a test environment so we'll hit yes it's going to run this and now we can see our result and so it returned to us an array of three documents that it found and it calculated the total sale amount so now over here on the side let's close this and let's refresh and we can see this new database that was created and a new collection sales and a total of eight documents that were created if we go back to atlas and we go to browse collections we can see the same thing we now have a new database a new collection and all of these new documents all right so we got our cluster set up we loaded some sample data and accessed our database from another application but there are other ways to access our database in the next video we're going to take a look at mongodb compass compass is the gui for mongodb it allows you to visually explore your data run ad hoc queries in seconds interact with your data with full crud functionality and we're going to use compass to load an existing data set for an e-commerce project that we're going to be building throughout this video series so be sure to watch for that the link to the series playlist is in the description below if you have any questions or feedback visit our community forum at community.mongodb.com our community and employees are there ready to answer your questions if this video was helpful be sure to like and subscribe [Music] you
Info
Channel: MongoDB
Views: 6,590
Rating: undefined out of 5
Keywords: difference between sql and nosql, getting-started, mongodb, mongodb atlas, mongodb jumpstart, mysql vs mongodb, nosql, nosql database, nosql database vs sql, nosql vs sql, serverless, sql, sql vs nosql, sql vs nosql database, what is nosql, crud, database, databases, mongodb atlas react, mongodb atlas realm, nosql tutorial for beginners, nosql tutorial, nosql vs relational, nosql vs postgresql, nosql vs non-relational, jamstack database, next js database, next js database example
Id: xrc7dIO_tXk
Channel Id: undefined
Length: 9min 41sec (581 seconds)
Published: Thu Jul 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.