hey gang and welcome to your very first mongodb tutorial [Music] all right gang so before anything else let's quickly talk about what mongodb is now i'm guessing if you're watching this tutorial and you want to learn how to use mongodb then you probably already know that it's a database something that we used to store data in whether that be user data for your website or blog data for a blog site or something else entirely but i want to dig a little bit deeper and talk about the type of database that mongodb is and what makes
it different from other databases so first of all mongodb is what's known as a nosql database meaning that we don't use sql commands to interact with it so one such sql database which you've probably heard of is my sequel and a nosql database like mongodb is very different to something like that so sql databases or relational databases as they're also known like mysql are made up of tables with rows and columns where each table is used to store a specific data type like users or blog posts and each row in a table is essentially a
record like a user record or a blog post record or a record for some other data types stored in that table now each of the columns is a property on that particular record like a username or an email a name agenda an id etc so you can see how data is stored in tables this way also oftentimes our different data types and therefore data tables can be related to one another for example we might have an author record stored in one table and book records stored in another now these are two different types of data
but they could be related to each other so we might form a relationship between the two tables for example one author might have many books so we'd have a one-to-many relationship between those tables and finally to query these sql databases we use sql commands which looks something like this select asterisks which means all from authors so that particular command would fetch all the records from the authors table now a nosql database like mongodb is very different from a sql database because instead of tables columns and rows it uses what's known as collections and documents so
this time each collection in a nosql database would store a specific type of data record like users authors or books or blog posts or something else entirely and in nosql terminology these records inside collections are called documents and they look very much like json objects with key value pairs and this structure can have a few benefits over using tables rows and columns firstly it's much easier to work with this if you're used to something like javascript because documents in mongodb are very much like json or javascript objects secondly it allows us to store nested documents
within a document for example a document in the books collection could have an author property and the author property could be a document in itself which has a first name property a last name property and an age property so this would be an alternative to the approach of using two different tables in a sql database to store those two data types separately but you could also have two separate collections for those data types in mongodb 2 if you preferred but we get this option of nested documents which is sometimes a better option and it allows
the structure of our data to be a little bit more flexible and also depending on your own coding background querying and nosql database could be easier too and that's especially the case with mongodb which makes it really easy to use simple methods to write and read data to and from the database and on top of that it's got a really good high speed performance so it's really quick to make and handle those queries so in this series you're going to learn how to use mongodb from complete scratch i'm going to show you how to install
it on your computer locally and interact with it using the mongodb shell and a gui called mongodb compass and to begin with we'll use those tools to learn all the basics like how to save data to collections retrieve data update it and delete it i'm also going to dive a bit deeper into concepts such as filtering data sorting data and making more complex queries and then after that we'll be using what we've learned to make a simple node api which interacts with mongodb to perform all of those crud operations creating data reading data updating data
and deleting data and we'll test those api endpoints that we make using a free tool called postman to make sure everything works as it should and then finally i'll show you how to set up a hosted database online using a service called mongodb atlas so that we can hook our node api up to that instead so there's loads and loads to learn and practice and hopefully it's going to be pretty fun as well now before you go jumping into the rest of the course i would strongly advise at this point that you already have a
basic understanding of a programming language and ideally json and in the second half of the course remember i will be making that node api as well so a basic understanding of node for that section would be very beneficial too now if you want to learn those things first which i do recommend doing then definitely check out my modern javascript course and also my node crash course the links to both of those series are going to be down below the video anyway now your introduction is out of the way let's crack on in the next lesson
and install mongodb on our computer by the way if you want to watch this entire course now without youtube adverts you can do it's all up on the net ninja website netninja.dev you can buy the course for two dollars to get instant access to all of it or you can sign up to net ninja pro and get instant access to all of my courses without adverts as well as premium courses not found on youtube including my udemy ones that's nine dollars a month and you can get your first month half price when you use this
promo code right here so i'm going to leave this link down below in the video description for you to sign up and i really hope you enjoyed this series and please do not forget to share subscribe and like the videos that really helps a lot and i'm going to see you in the very next lesson