Installing MongoDB

Yogesh Patel
A free video tutorial from Yogesh Patel
Software Developer and Programming Enthusiast
4.1 instructor rating • 21 courses • 72,587 students

Learn more from the full course

MongoDB Tutorial for Beginners

Learn MongoDB in simple and easy steps using this beginner's tutorial containing basic to advanced knowledge

01:46:54 of on-demand video • Updated March 2016

  • Install MongoDB
  • Run MongoDB Locally
  • Learn how to use Documents and Collections
  • Understand terminal commands for managing the database
  • Be able to execute CRUD (create, read, update, delete) functions within mongo shell
English [Auto] Hello guys will to the first video on Mongo D-B to troll for beginners. Now let's see the brief introduction of Mongo D-B before we try to install Mongar D-B are no windows operating system. So what is Mongar D.B Mongar D-B is a document oriented. No skewl database. That means it's not a relational database. It's a non relational database. Now what is the difference between a relational database and non relational database. Or we can say what is the difference between knowing SQL database and a database. Now as Cuil database for example my skill or postscripts QOL has our relational database format. For example they have tables columns and rows which are related to each other. Right but in no Eskil database these collections or these data are not related with each other and they are non relational. Right now Mongar D-B is a schema free database and it's based on a binary Jason format and the special format is called Beason and which B stand for binary and or and comes from Jason. Now mongered reorganizes itself in a group of documents which are called collections right. And using Mongar DBI auto shadowing in order to scale horizontally is easier. And this is the advanced feature which we are going to see later and Mongar DBI uses why the language which is a simple language and it has a rich document based Grady which is a little bit different from your normal you know relational database queries and its open source database. Right now let's see what is the difference between Mongar DBI versus some relational databases. So as I already told you that Mungo's DBI uses collection Wallaces the table. So in normal relational databases something like my school or other school database they use is tables but in Mongolia be the set of tables. We use collections right and now inside these collection we have documents instead of rows right. So in the relational database if you know that every table can contain multiple columns and rows we have the replacement of row in noise database or mongered DB especially which is document. OK so collection is like a table. Document is like our row and the field is like a column. OK so instead of using table row and column terminology we are going to use collection documented and field right and collection is strict about what goes inside like your normal you know relational database it's too strict or what should go inside it. But this collection isn't so strict and it's Kema less. OK so this is our small brief introduction about Mongo D-B. Now let's download mongered be on all Windows operating system and let's dive more into Mongolia. So open your favorite browser and search for Mongo D.B and the firstling which will appear here will be from mongerer D-B dot or G. Just click this link and you will be able to see two buttons. One is download Mongul D-B is mongered the becloud manager you want to click this button which is download Mongar D-B and in here you can see there are different variants of downloads available for Linux Mac OS and Solaris. We want to download it for a Windows operating system in here. They have different flavors you can see here you want to download it for the 64 bit operating system so we will just leave it as default and then click download. Now save this MSIE file any wherever you want to save it and once it's saved we will be ready to install Mongo DBI on our windows operating system. So now this MSA file is downloaded so I'm going to click this MSIE file and I'm going to minimize my browser and now you can see this Windows install is starting and you just need to click Next here and you just need to agree with delightsome storms and conditions and then click next and you just need to you know choose this complete option and then click install. OK. And now it's going to install Mongul DBI on your Windows operating system. And in few seconds Mongul the B will be installed and now you can see Mongar D-B is installed on our windows operating system so we can just click Finish. Now let's see where this Mongo D-B is installed on our windows operating system. So open you are a the Explorer and go in to see directory here and go to program files and the program files you will be able to find this mongered the folder and side this Mongolia before the click on. So and then the version 3.0 and you will be able to see this Ben Folds here. Right. And in here you can see a bunch of executable file. Now there are two executable files which are of interest for us. One is Mangu-Ward see and the other is Mongo. The dot you see now Mongo D is a mongo daemon which is going to run in the background and it's going to accept the connection from Mongo D-B. So it's a background process right. And this Mongo dot X-C is a command line shell from which you are going to walk the to our database. So in order to work with Mongo D-B you just need to run Mongo DeviantArt mongered demon in the background and then you can open Mungo's shell to work with TR databases. Right now let's see how we can open this Mongul D and the command prompt. So what you can do is you can right click on your start menu and open the command prompt and then you can you know go or browse to the spot which is up to this bin for them or otherwise. The short cut for you know opening this folder is halti or shift key. So just hold the shift key and then right click your mouse and then you will be able to see this open command window here. So you can just click this and it's going to open the command window in this folder and then in here you just need to run Mongul the first Saw just right Mongul d dot C and then press enter and it's going to you know give you this error. And let's see what this error is. So you can see it says see Colon's slash data slash D-B. Not phone. So in order to work with Mongo D-B you need to have this kind of folder structure in your C drive which is data slash D-B. So we're going to create this these folders inside our C-drive. So open for the Explora once again go to your C-drive and then create a new folder here. And we're going to name it as data and go inside this data folder and create a new folder which we're going to name it as DB. OK. So data and DB. OK. So you need to have this kind of folder structure in order to you know work with Mongo D-B we just see data and D-B. OK. So once you are done with this you can run this mongered the command once again so mongered the dot SC and press enter. And now you can see Mongar is running. You can just click allow access from here. And then you can see this is ready to dig the connection. So I'm going to maximize it and you can see waiting for connections. Right now what we are going to do next is we're going to open one more terminal to our you know open this Mangu-Ward see file. OK. So once again go to this folder Benfold the inside Mongo D-B right click before right click. You need to press shift so shift and then right click and then open command window here once again I'm going to maximize it. This is our previous shell and this is our new so we're going to once again run Mongo the dog you see and press enter. And now you can see here. Connection accepted here. Right. So you are you know run this mongered the X-C is going to you know open this kind of interface. And now from this interface you can connect to your databases. And from this this is running in the background. This other you know command prompt which runs Mongo did you see. Right. So it's taking the connection and for testing it for example we will just type here D.B and press enter. And you can see we have a sample database here which is called test. OK. So this is all about the installation of Mongar D.B in the next video we will learn more about Mongo. So stay tuned and please read commands of tribe and bye for now.